Переглянути джерело

Properly cleanup ingress sandbox in controller

When ingress sandbox is removed, properly cleanup the reference in the
controller.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Jana Radhakrishnan 9 роки тому
батько
коміт
8d1adbd665
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      libnetwork/sandbox.go

+ 3 - 0
libnetwork/sandbox.go

@@ -245,6 +245,9 @@ func (sb *sandbox) delete(force bool) error {
 	}
 
 	c.Lock()
+	if sb.ingress {
+		c.ingressSandbox = nil
+	}
 	delete(c.sandboxes, sb.ID())
 	c.Unlock()