mirror of
https://github.com/netbirdio/netbird.git
synced 2025-03-13 06:08:48 +01:00
Close unused rawsocket
This commit is contained in:
parent
082452eb5f
commit
335866ac60
@ -81,6 +81,13 @@ func (p *WGUDPProxy) Work() {
|
|||||||
p.paused = false
|
p.paused = false
|
||||||
p.sendPkg = p.localConn.Write
|
p.sendPkg = p.localConn.Write
|
||||||
|
|
||||||
|
if p.srcFakerConn != nil {
|
||||||
|
if err := p.srcFakerConn.Close(); err != nil {
|
||||||
|
log.Errorf("failed to close src faker conn: %s", err)
|
||||||
|
}
|
||||||
|
p.srcFakerConn = nil
|
||||||
|
}
|
||||||
|
|
||||||
if !p.isStarted {
|
if !p.isStarted {
|
||||||
p.isStarted = true
|
p.isStarted = true
|
||||||
go p.proxyToRemote(p.ctx)
|
go p.proxyToRemote(p.ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user