mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-21 14:11:56 +00:00
ipn/ipnserver: remove IdleTimeout
We no longer need this on Windows, and it was never required on other platforms. It just results in more short-lived connections unless we use HTTP/2. Updates tailscale/corp#18342 Signed-off-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:
parent
e7a6e7930f
commit
e7b5e8c8cd
@ -18,7 +18,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"tailscale.com/envknob"
|
"tailscale.com/envknob"
|
||||||
@ -505,14 +504,6 @@ func (s *Server) Run(ctx context.Context, ln net.Listener) error {
|
|||||||
ConnContext: func(ctx context.Context, c net.Conn) context.Context {
|
ConnContext: func(ctx context.Context, c net.Conn) context.Context {
|
||||||
return contextWithActor(ctx, s.logf, c)
|
return contextWithActor(ctx, s.logf, c)
|
||||||
},
|
},
|
||||||
// Localhost connections are cheap; so only do
|
|
||||||
// keep-alives for a short period of time, as these
|
|
||||||
// active connections lock the server into only serving
|
|
||||||
// that user. If the user has this page open, we don't
|
|
||||||
// want another switching user to be locked out for
|
|
||||||
// minutes. 5 seconds is enough to let browser hit
|
|
||||||
// favicon.ico and such.
|
|
||||||
IdleTimeout: 5 * time.Second,
|
|
||||||
ErrorLog: logger.StdLogger(logger.WithPrefix(s.logf, "ipnserver: ")),
|
ErrorLog: logger.StdLogger(logger.WithPrefix(s.logf, "ipnserver: ")),
|
||||||
}
|
}
|
||||||
if err := hs.Serve(ln); err != nil {
|
if err := hs.Serve(ln); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user