mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
Fix build
This commit is contained in:
parent
a4a346c498
commit
d9fd68f18c
@ -465,12 +465,14 @@ func (c *Core) RemovePeer(addr string, sintf string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ports := c.peers.ports.Load().(map[switchPort]*peer)
|
c.peers.Act(nil, func() {
|
||||||
for p, peer := range ports {
|
ports := c.peers.ports
|
||||||
if addr == peer.intf.name {
|
for _, peer := range ports {
|
||||||
c.peers.removePeer(p)
|
if addr == peer.intf.name() {
|
||||||
|
c.peers._removePeer(peer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user