An endpoint is duplicate/stale if its ID is part of endpoint index.

Signed-off-by: Dong Chen <dongluo.chen@docker.com>
This commit is contained in:
Dong Chen 2016-03-22 14:10:57 -07:00
parent d045bd44e0
commit 0436dd1f26
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ func (network *Network) RemoveDuplicateEndpoints() *Network {
// if this endpointID doesn't exist yet, add it
// if this endpointID exists, but endpointIndex is not a duplicate, use
// this endpointIndex
if _, ok := endpointMap[endpointID]; !ok || !strings.HasPrefix(endpointIndex, "ep-") {
if _, ok := endpointMap[endpointID]; !ok || !strings.Contains(endpointIndex, endpointID) {
endpointMap[endpointID] = endpointIndex
}
}