mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
log/sockstatlog: don't block for more than 5s on shutdown
Fixes tailscale/corp#21618 Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:

committed by
Anton Tolchanov

parent
9609b26541
commit
5d61d1c7b0
@@ -242,12 +242,12 @@ func (l *Logger) Flush() {
|
||||
l.logger.StartFlush()
|
||||
}
|
||||
|
||||
func (l *Logger) Shutdown() {
|
||||
func (l *Logger) Shutdown(ctx context.Context) {
|
||||
if l.cancelFn != nil {
|
||||
l.cancelFn()
|
||||
}
|
||||
l.filch.Close()
|
||||
l.logger.Shutdown(context.Background())
|
||||
l.logger.Shutdown(ctx)
|
||||
|
||||
type closeIdler interface {
|
||||
CloseIdleConnections()
|
||||
|
Reference in New Issue
Block a user