From f42e275884ff65395296e1c280559bcd12f8ddf3 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 19 Mar 2016 13:57:20 +0000 Subject: [PATCH] broadcast ipam ring update after rmpeer So that other peers notice the change more promptly. Fixes #2068. --- ipam/allocator.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipam/allocator.go b/ipam/allocator.go index a9f3d13b..74168059 100644 --- a/ipam/allocator.go +++ b/ipam/allocator.go @@ -334,7 +334,10 @@ func (alloc *Allocator) AdminTakeoverRanges(peerNameOrNickname string) error { } newRanges, err := alloc.ring.Transfer(peername, alloc.ourName) - alloc.space.AddRanges(newRanges) + if err == nil && len(newRanges) > 0 { + alloc.space.AddRanges(newRanges) + alloc.gossip.GossipBroadcast(alloc.Gossip()) + } resultChan <- err } return <-resultChan