diff --git a/cmd/tailscaled/tailscaled.go b/cmd/tailscaled/tailscaled.go index 502f5ce9d..4b865e4e1 100644 --- a/cmd/tailscaled/tailscaled.go +++ b/cmd/tailscaled/tailscaled.go @@ -61,7 +61,6 @@ func main() { opts := ipnserver.Options{ StatePath: *statepath, SurviveDisconnects: true, - AllowQuit: false, } err = ipnserver.Run(context.Background(), logf, pol.PublicID.String(), opts, e) if err != nil { diff --git a/ipn/ipnserver/server.go b/ipn/ipnserver/server.go index e82086c0b..9d2964d85 100644 --- a/ipn/ipnserver/server.go +++ b/ipn/ipnserver/server.go @@ -31,7 +31,6 @@ import ( type Options struct { StatePath string SurviveDisconnects bool - AllowQuit bool } func pump(logf logger.Logf, ctx context.Context, bs *ipn.BackendServer, s net.Conn) { @@ -137,11 +136,8 @@ func Run(rctx context.Context, logf logger.Logf, logid string, opts Options, e w bs.Reset() s.Close() } - if opts.AllowQuit { - os.Exit(0) - } else { - bs.GotQuit = false - } + // Quitting not allowed, just keep going. + bs.GotQuit = false }(ctx, bs, s, i) bo.BackOff(ctx, nil)