set default timeouts and clean up
This commit is contained in:
committed by
Jörn Friedrich Dreyer
parent
9a3fc08dd4
commit
c597dfb917
@@ -101,7 +101,7 @@ func NewGolangHttpServerRunner(name string, server *http.Server, opts ...Option)
|
||||
}, func() {
|
||||
// Since Shutdown might take some time, don't block
|
||||
go func() {
|
||||
// TODO: Provide the adjustable TimeoutDuration
|
||||
// Use the DefaultInterruptDuration or InterruptDuration as the shutdown timeout.
|
||||
shutdownCtx, cancel := context.WithTimeout(context.Background(), DefaultInterruptDuration)
|
||||
defer cancel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user