Increase server shutdown timeout

We shouldn't see this unless we fail to get everything closed down.
This commit is contained in:
Eli Ribble 2026-04-28 22:37:43 +00:00
parent a17544bb4b
commit bd3d3881f5
No known key found for this signature in database

View file

@ -170,11 +170,11 @@ func main() {
os.Stderr.Sync()
platform.EventShutdown()
shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), 5*time.Second)
shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), 30*time.Second)
defer shutdownCancel()
if err := server.Shutdown(shutdownCtx); err != nil {
log.Warn().Err(err).Msg("Error on HTTP server shutdown")
log.Error().Err(err).Msg("Server didn't shutdown cleanly")
}
cancel()