Increase server shutdown timeout
We shouldn't see this unless we fail to get everything closed down.
This commit is contained in:
parent
a17544bb4b
commit
bd3d3881f5
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue