Add allocator.PeerGone
The function is registered within the mesh gc and it is responsible for removing gone nicknames (#2057).
This commit is contained in:
1 parent
2f5a3f4513
commit
849edb1768
2 files changed
+19
No files matched your search
@@ -452,6 +452,7 @@ func createAllocator(router *weave.NetworkRouter, config ipamConfig, db db.DB, i
|
||||
|
||||
allocator.SetInterfaces(router.NewGossip("IPallocation", allocator))
|
||||
allocator.Start()
|
||||
router.Peers.OnGC(func(peer *mesh.Peer) { allocator.PeerGone(peer.Name) })
|
||||
|
||||
return allocator, defaultSubnet
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user