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 <crawshaw@tailscale.com>
crawshaw/dnsguid
David Crawshaw 3 years ago
parent b4f70d8232
commit bb533f067c

@ -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)

Loading…
Cancel
Save