mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-24 19:51:33 +02:00
Update client/iface/wgproxy/udp/proxy.go
Co-authored-by: Viktor Liu <17948409+lixmal@users.noreply.github.com>
This commit is contained in:
parent
f0020ad4ce
commit
648b4cdf72
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user