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
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>
5 years ago
..
cloner all: adjust Unix permissions for those without umasks 5 years ago
derper cmd/derper: add /bootstrap-dns handler 5 years ago
hello client/tailscale/apitype: move local API types to new apitype package 5 years ago
microproxy cmd/microproxy: add -insecure flag 5 years ago
mkpkg cmd/mkpkg: support adding empty directories. 6 years ago
tailscale cmd/tailscale/cli: relax & improve the running-as-CLI check for macOS 5 years ago
tailscaled cmd/tailscaled: don't block ipnserver startup behind engine init on Windows 5 years ago
tsshd net/interfaces: remove IsTailscaleIP, make callers use tsaddr. 5 years ago