Update client/iface/wgproxy/udp/proxy.go

Co-authored-by: Viktor Liu <17948409+lixmal@users.noreply.github.com>
This commit is contained in:
Zoltan Papp 2025-02-21 14:50:29 +01:00 committed by GitHub
parent f0020ad4ce
commit 648b4cdf72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -228,17 +228,9 @@ func (p *WGUDPProxy) proxyToLocal(ctx context.Context) {
return
}
for {
p.pausedCond.L.Lock()
if p.paused {
for p.paused {
p.pausedCond.Wait()
if !p.paused {
break
}
p.pausedCond.L.Unlock()
continue
}
break
}
_, err = p.sendPkg(buf[:n])
p.pausedCond.L.Unlock()