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

Merge pull request #1365 from sanimej/gossip

Do not create network entry for the local node in the db based on peer's state sync.
This commit is contained in:
Madhu Venugopal 2016-08-02 14:49:44 -07:00 committed by GitHub
commit c9eb73fccc

View file

@ -25,6 +25,10 @@ func (nDB *NetworkDB) handleNetworkEvent(nEvent *NetworkEvent) bool {
nDB.Lock() nDB.Lock()
defer nDB.Unlock() defer nDB.Unlock()
if nEvent.NodeName == nDB.config.NodeName {
return false
}
nodeNetworks, ok := nDB.networks[nEvent.NodeName] nodeNetworks, ok := nDB.networks[nEvent.NodeName]
if !ok { if !ok {
// We haven't heard about this node at all. Ignore the leave // We haven't heard about this node at all. Ignore the leave