Don't crash when dockerCli is nil
This commit is contained in:
1 parent
ed83efbceb
commit
7ebf3d7a88
1 file changed
+5
-3
+5
-3
@@ -298,9 +298,11 @@ func main() {
|
|||||||
}
|
}
|
||||||
allocator, defaultSubnet = createAllocator(router, ipamConfig, db, t, isKnownPeer)
|
allocator, defaultSubnet = createAllocator(router, ipamConfig, db, t, isKnownPeer)
|
||||||
observeContainers(allocator)
|
observeContainers(allocator)
|
||||||
ids, err := dockerCli.AllContainerIDs()
|
if dockerCli != nil {
|
||||||
checkFatal(err)
|
ids, err := dockerCli.AllContainerIDs()
|
||||||
allocator.PruneOwned(ids)
|
checkFatal(err)
|
||||||
|
allocator.PruneOwned(ids)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
Reference in new issue
Block a user