logtail: close idle HTTP connections on shutdown

Fixes tailscale/corp#21609

Co-authored-by: Maisem Ali <maisem@tailscale.com>
Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov 2024-07-12 17:11:19 +01:00 committed by Anton Tolchanov
parent f0b9d3f477
commit 7403d8e9a8
1 changed files with 1 additions and 0 deletions

View File

@ -266,6 +266,7 @@ func (l *Logger) Shutdown(ctx context.Context) error {
case <-l.shutdownDone:
}
close(done)
l.httpc.CloseIdleConnections()
}()
l.shutdownStartMu.Lock()