You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/cmd/tailscaled
Brad Fitzpatrick 91c9c33036 cmd/tailscaled: don't block ipnserver startup behind engine init on Windows
With this change, the ipnserver's safesocket.Listen (the localhost
tcp.Listen) happens right away, before any synchronous
TUN/DNS/Engine/etc setup work, which might be slow, especially on
early boot on Windows.

Because the safesocket.Listen starts up early, that means localhost
TCP dials (the safesocket.Connect from the GUI) complete successfully
and thus the GUI avoids the MessageBox error. (I verified that
pacifies it, even without a Listener.Accept; I'd feared that Windows
localhost was maybe special and avoided the normal listener backlog).

Once the GUI can then connect immediately without errors, the various
timeouts then matter less, because the backend is no longer trying to
race against the GUI's timeout. So keep retrying on errors for a
minute, or 10 minutes if the system just booted in the past 10
minutes.

This should fix the problem with Windows 10 desktops auto-logging in
and starting the Tailscale frontend which was then showing a
MessageBox error about failing to connect to tailscaled, which was
slow coming up because the Windows networking stack wasn't up
yet. Fingers crossed.

Fixes #1313 (previously #1187, etc)

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
3 years ago
..
debug.go Revert "cmd/tailscaled: split package main into main shim + package" 3 years ago
depaware.txt cmd/tailscaled: add subcommands to install and remove tailscaled Windows service 3 years ago
install_darwin.go cmd/tailscaled: remove tailscaled binary on uninstall-system-daemon 3 years ago
install_windows.go cmd/tailscaled: add subcommands to install and remove tailscaled Windows service 3 years ago
tailscaled.defaults cmd/tailscaled: rename relaynode reference in defaults file comment 4 years ago
tailscaled.go ipn: don't Logout when Windows GUI disconnects 3 years ago
tailscaled.service cmd/tailscaled/tailscaled.service: revert recent hardening for now 3 years ago
tailscaled_notwindows.go Revert "cmd/tailscaled: split package main into main shim + package" 3 years ago
tailscaled_windows.go cmd/tailscaled: don't block ipnserver startup behind engine init on Windows 3 years ago