From 116b1472cf69f920e27da36702a39959bc83b315 Mon Sep 17 00:00:00 2001 From: maride Date: Sat, 8 Sep 2018 02:18:52 +0200 Subject: Fix: allow VPN network to be deletable, too (disconnect companion from that network) --- src/access.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/access.go b/src/access.go index 69c8fb1..233b11c 100644 --- a/src/access.go +++ b/src/access.go @@ -135,6 +135,9 @@ func stopVPN() { timeout := time.Second * 5 dockerCli.ContainerStop(dockerCtx, vpnContainerID, &timeout) + // We need to undo our stunt! Else, the network won't be deletable because "there are active endpoints" + dockerCli.NetworkDisconnect(dockerCtx, vpnHostNetworkID, os.Getenv("HOSTNAME"), true) + vpnContainerID = "" } -- cgit 1.4.1