From c5a0c62c4f926cd49041c71f5bda06f42235e325 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 29 Aug 2019 17:53:16 -0600 Subject: manager: delay stale adapter cleanup By delaying this by 10 seconds, we ensure that we don't cause the locks to be contended immediately on startup. Before, this added around 600ms of latency to tunnel startup. --- manager/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manager/service.go') diff --git a/manager/service.go b/manager/service.go index 43dd5d4c..47ba51bc 100644 --- a/manager/service.go +++ b/manager/service.go @@ -247,7 +247,7 @@ func (service *managerService) Execute(args []string, r <-chan svc.ChangeRequest }() } - go cleanupStaleAdapters() + time.AfterFunc(time.Second*10, cleanupStaleWintunInterfaces) go checkForUpdates() var sessionsPointer *windows.WTS_SESSION_INFO -- cgit v1.2.3-59-g8ed1b