Explorar el Código

Ignoring Driver failure on Leave.

After some delibration, we think it is better not to hold onto the
sandbox resources if an explicit call to Leave fails by the Driver.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Madhu Venugopal hace 10 años
padre
commit
95c5eb2856
Se han modificado 1 ficheros con 1 adiciones y 5 borrados
  1. 1 5
      libnetwork/endpoint.go

+ 1 - 5
libnetwork/endpoint.go

@@ -213,14 +213,10 @@ func (ep *endpoint) Leave(containerID string, options ...EndpointOption) error {
 
 
 	n := ep.network
 	n := ep.network
 	err := n.driver.Leave(n.id, ep.id, ep.context)
 	err := n.driver.Leave(n.id, ep.id, ep.context)
-	if err != nil {
-		return err
-	}
-
 	ep.network.ctrlr.sandboxRm(ep.container.data.SandboxKey)
 	ep.network.ctrlr.sandboxRm(ep.container.data.SandboxKey)
 	ep.container = nil
 	ep.container = nil
 	ep.context = nil
 	ep.context = nil
-	return nil
+	return err
 }
 }
 
 
 func (ep *endpoint) Delete() error {
 func (ep *endpoint) Delete() error {