mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-20 11:33:07 +02:00
Close unused rawsocket
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user