1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #30773 from aboch/gn

getAllNetworks unnecessary walks all the networks
This commit is contained in:
Sebastiaan van Stijn 2017-02-06 20:28:30 -08:00 committed by GitHub
commit 7c7be84238

View file

@ -96,15 +96,7 @@ func (daemon *Daemon) GetNetworksByID(partialID string) []libnetwork.Network {
// getAllNetworks returns a list containing all networks
func (daemon *Daemon) getAllNetworks() []libnetwork.Network {
c := daemon.netController
list := []libnetwork.Network{}
l := func(nw libnetwork.Network) bool {
list = append(list, nw)
return false
}
c.WalkNetworks(l)
return list
return daemon.netController.Networks()
}
func isIngressNetwork(name string) bool {