Merge pull request #1958 from ityangchen/test-libnetwork

Repair (*Broadcaster).run goroutine leak
This commit is contained in:
Flavio Crisciani 2017-09-30 10:44:12 -07:00 committed by GitHub
commit ef2e91707d

View file

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