mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-13 10:21:10 +01:00
Fix RemoveConnByUfrag
This commit is contained in:
parent
5a504ee6be
commit
f07671cf49
@ -176,7 +176,15 @@ func (m *UDPMuxDefault) RemoveConnByUfrag(ufrag string) {
|
|||||||
for _, c := range removedConns {
|
for _, c := range removedConns {
|
||||||
addresses := c.getAddresses()
|
addresses := c.getAddresses()
|
||||||
for _, addr := range addresses {
|
for _, addr := range addresses {
|
||||||
delete(m.addressMap, addr)
|
if connList, ok := m.addressMap[addr]; ok {
|
||||||
|
var newList []*udpMuxedConn
|
||||||
|
for _, conn := range connList {
|
||||||
|
if conn.params.Key != ufrag {
|
||||||
|
newList = append(newList, conn)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.addressMap[addr] = newList
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user