Browse Source

Fix build

tags/v0.3.15^2
Neil Alexander 2 years ago
parent
commit
e09ca6a089
No known key found for this signature in database GPG Key ID: A02A2019A2BB0944
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      src/yggdrasil/api.go

+ 7
- 5
src/yggdrasil/api.go View File

@@ -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…
Cancel
Save