1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Repair (*Broadcaster).run goroutine leak

When execute 'docker swarm init' and 'docker swarm leave -f' on a node
repeatedly, the (*Broadcaster).run goroutine leak.

Signed-off-by: yangchenliang <yangchenliang@huawei.com>
This commit is contained in:
yangchenliang 2017-09-26 10:05:18 +08:00
parent c69b749801
commit 955c532735

View file

@ -261,6 +261,9 @@ func (nDB *NetworkDB) Close() {
if err := nDB.clusterLeave(); err != nil {
logrus.Errorf("Could not close DB %s: %v", nDB.config.NodeName, err)
}
//Avoid (*Broadcaster).run goroutine leak
nDB.broadcaster.Close()
}
// ClusterPeers returns all the gossip cluster peers.