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 return
} }
for { p.pausedCond.L.Lock()
p.pausedCond.L.Lock() for p.paused {
if p.paused { p.pausedCond.Wait()
p.pausedCond.Wait()
if !p.paused {
break
}
p.pausedCond.L.Unlock()
continue
}
break
} }
_, err = p.sendPkg(buf[:n]) _, err = p.sendPkg(buf[:n])
p.pausedCond.L.Unlock() p.pausedCond.L.Unlock()