summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@tailscale.com>2020-12-21 17:21:06 -0500
committerDavid Crawshaw <crawshaw@tailscale.com>2020-12-21 17:22:46 -0500
commitbb533f067c7ab4017fe4ea66756ca4a58fc8f70d (patch)
treebc09a0829c29f62b8deb7a6b66e7228a186cb784
parentb4f70d82328b8cb7d49a24f0bdec9f38f3e511d9 (diff)
downloadtailscale-crawshaw/dnsguid.tar.xz
tailscale-crawshaw/dnsguid.zip
wgengine/router/dns: reduce windows registry key open timeoutcrawshaw/dnsguid
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 <crawshaw@tailscale.com>
-rw-r--r--wgengine/router/dns/manager_windows.go2
1 files changed, 1 insertions, 1 deletions
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)