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:
parent
c69b749801
commit
955c532735
1 changed files with 3 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue