aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/manager/ipc_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'manager/ipc_server.go')
-rw-r--r--manager/ipc_server.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/manager/ipc_server.go b/manager/ipc_server.go
index 7691adb8..ed60d6b6 100644
--- a/manager/ipc_server.go
+++ b/manager/ipc_server.go
@@ -107,6 +107,7 @@ func (s *ManagerService) Start(tunnelName string, unused *uintptr) error {
}
}
}()
+ go cleanupStaleAdapters()
// After that process is started -- it's somewhat asynchronous -- we install the new one.
c, err := conf.LoadFromName(tunnelName)
@@ -121,6 +122,8 @@ func (s *ManagerService) Start(tunnelName string, unused *uintptr) error {
}
func (s *ManagerService) Stop(tunnelName string, _ *uintptr) error {
+ go cleanupStaleAdapters()
+
err := UninstallTunnel(tunnelName)
if err == windows.ERROR_SERVICE_DOES_NOT_EXIST {
_, notExistsError := conf.LoadFromName(tunnelName)