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