mirror of https://github.com/docker/docs.git
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:
parent
d045bd44e0
commit
0436dd1f26
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue