aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/manager/ipc_server.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--manager/ipc_server.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/manager/ipc_server.go b/manager/ipc_server.go
index 48db057e..a8c8064b 100644
--- a/manager/ipc_server.go
+++ b/manager/ipc_server.go
@@ -148,8 +148,9 @@ func (s *ManagerService) Start(tunnelName string) error {
}
}
}()
- time.AfterFunc(time.Second*10, cleanupStaleNetworkInterfaces)
-
+ if conf.AdminBool("UseUserspaceImplementation") {
+ time.AfterFunc(time.Second*10, cleanupStaleWintunInterfaces)
+ }
// After the stop process has begun, but before it's finished, we install the new one.
path, err := c.Path()
if err != nil {
@@ -159,8 +160,9 @@ func (s *ManagerService) Start(tunnelName string) error {
}
func (s *ManagerService) Stop(tunnelName string) error {
- time.AfterFunc(time.Second*10, cleanupStaleNetworkInterfaces)
-
+ if conf.AdminBool("UseUserspaceImplementation") {
+ time.AfterFunc(time.Second*10, cleanupStaleWintunInterfaces)
+ }
err := UninstallTunnel(tunnelName)
if err == windows.ERROR_SERVICE_DOES_NOT_EXIST {
_, notExistsError := conf.LoadFromName(tunnelName)