From bb533f067c7ab4017fe4ea66756ca4a58fc8f70d Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Mon, 21 Dec 2020 17:21:06 -0500 Subject: [PATCH] wgengine/router/dns: reduce windows registry key open timeout The windows key timeout is longer than the wgengine watchdog timeout, which means we never reach the timeout, instead the process exits. Reduce the timeout so if we do hit it, at least the process continues. Signed-off-by: David Crawshaw --- wgengine/router/dns/manager_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgengine/router/dns/manager_windows.go b/wgengine/router/dns/manager_windows.go index 2af53795e..b71b2255c 100644 --- a/wgengine/router/dns/manager_windows.go +++ b/wgengine/router/dns/manager_windows.go @@ -37,7 +37,7 @@ func newManager(mconfig ManagerConfig) managerImpl { // appear. For some reason, registry keys tied to ephemeral interfaces // can take a long while to appear after interface creation, and we // can end up racing with that. -const keyOpenTimeout = time.Minute +const keyOpenTimeout = 20 * time.Second func setRegistryString(path, name, value string) error { key, err := openKeyWait(registry.LOCAL_MACHINE, path, registry.SET_VALUE, keyOpenTimeout)