ipn/ipnserver: remove Options.AllowQuit.

It was previously used by the MacOS client, but it now does
something different. ipnserver should never obey a client's
request to exit.

Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
David Anderson 2020-02-14 14:52:43 -08:00
parent c393f0bfae
commit dec5d64593
2 changed files with 2 additions and 7 deletions

View File

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

View File

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