mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Cleanup servicebindings only on Windows
Make the call to cleanupServiceBindings during network deletion conditional on Windows (where it is required), thereby providing a performance improvement to network cleanup on Linux. Signed-off-by: Trapier Marshall <tmarshall@mirantis.com>
This commit is contained in:
parent
6861aade58
commit
a46700dbdb
1 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"net"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -1081,7 +1082,9 @@ func (n *network) delete(force bool, rmLBEndpoint bool) error {
|
|||
// Cleanup the load balancer. On Windows this call is required
|
||||
// to remove remote loadbalancers in VFP, and must be performed before
|
||||
// dataplane network deletion.
|
||||
c.cleanupServiceBindings(n.ID())
|
||||
if runtime.GOOS == "windows" {
|
||||
c.cleanupServiceBindings(n.ID())
|
||||
}
|
||||
|
||||
// Delete the network from the dataplane
|
||||
if err = n.deleteNetwork(); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue