Revert "Fix build"

This reverts commit e09ca6a089cbb138e7743931f34fe766bf062bd6.
This commit is contained in:
Neil Alexander 2020-09-27 13:28:13 +01:00
parent e09ca6a089
commit 48bf0ce210
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -485,14 +485,12 @@ func (c *Core) RemovePeer(addr string, sintf string) error {
} }
} }
c.peers.Act(nil, func() { ports := c.peers.ports.Load().(map[switchPort]*peer)
ports := c.peers.ports for p, peer := range ports {
for _, peer := range ports { if addr == peer.intf.name {
if addr == peer.intf.name() { c.peers.removePeer(p)
c.peers._removePeer(peer)
}
} }
}) }
return nil return nil
} }