Pārlūkot izejas kodu

libnetwork: only delete svc db entry on network rm

The service db entry for each network is deleted by
(*Controller).cleanupServiceDiscovery() when the network is deleted.
There is no need to also eagerly delete it whenever the network's
endpoint count drops to zero.

Signed-off-by: Cory Snider <csnider@mirantis.com>
Cory Snider 1 gadu atpakaļ
vecāks
revīzija
804ef16822
1 mainītis faili ar 0 papildinājumiem un 3 dzēšanām
  1. 0 3
      libnetwork/store.go

+ 0 - 3
libnetwork/store.go

@@ -239,9 +239,6 @@ func (c *Controller) processEndpointDelete(ep *Endpoint) {
 
 		c.mu.Lock()
 		if len(nw.localEps) == 0 {
-			// This is the last container going away for the network. Destroy
-			// this network's svc db entry
-			delete(c.svcRecords, networkID)
 			delete(c.nmap, networkID)
 		}
 	}