mirror of https://github.com/tailscale/tailscale/
ipn: cc.Login(noninteractive) at start even if WantRunning=false.
We were not properly initializing controlclient at startup, if Prefs.WantRunning was initially false. This originally would cause the state machine to get stuck in NewState, but an earlier erroneous change tried to make it get stuck in NeedsLogin instead, which is incorrect; NeedsLogin means we need *interactive* login, which is not true. The correct fix is to not get it stuck. While we're here: - Add a bunch of comments to explain how these work. - Unexport the Status.state var from controlclient. There has not been any need for outsiders to inspect it for a long time; it's needed only by unit tests. - Remove a very suspicious check from AuthCantContinue that its self pointer != nil. - Remove an extremely suspicious "defer b.stateMachine()" from Start(). There is no need to run the state machine when nothing has happened yet; any apparent need for this is a sign of some other bug. Fixes tailscale/corp#1660 (iOS app startup bug) Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>apenwarr/ioslogin
parent
306a094d4b
commit
a8766815a4
Loading…
Reference in New Issue