From 48bf0ce2109542d2fa010d6878bcd4a3f40307ba Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 27 Sep 2020 13:28:13 +0100 Subject: [PATCH] Revert "Fix build" This reverts commit e09ca6a089cbb138e7743931f34fe766bf062bd6. --- src/yggdrasil/api.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/yggdrasil/api.go b/src/yggdrasil/api.go index 4232f3c..be905cb 100644 --- a/src/yggdrasil/api.go +++ b/src/yggdrasil/api.go @@ -485,14 +485,12 @@ func (c *Core) RemovePeer(addr string, sintf string) error { } } - c.peers.Act(nil, func() { - ports := c.peers.ports - for _, peer := range ports { - if addr == peer.intf.name() { - c.peers._removePeer(peer) - } + ports := c.peers.ports.Load().(map[switchPort]*peer) + for p, peer := range ports { + if addr == peer.intf.name { + c.peers.removePeer(p) } - }) + } return nil }