mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-24 11:41:35 +02:00
Apply same pausedCond logic on all implementation
This commit is contained in:
parent
648b4cdf72
commit
d496d21693
@ -161,17 +161,9 @@ func (p *ProxyBind) 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := bind.RecvMessage{
|
msg := bind.RecvMessage{
|
||||||
|
@ -120,17 +120,9 @@ func (p *ProxyWrapper) 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.wgeBPFProxy.sendPkg(buf[:n], p.wgEndpointCurrentUsedAddr)
|
err = p.wgeBPFProxy.sendPkg(buf[:n], p.wgEndpointCurrentUsedAddr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user