5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 14:10:28 +00:00

Fix build

This commit is contained in:
Neil Alexander 2020-07-06 14:21:28 +01:00
parent 7588a55e84
commit e09ca6a089
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -485,12 +485,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
} }