set default timeouts and clean up

This commit is contained in:
Roman Perekhod
2025-09-12 12:18:47 +02:00
committed by Jörn Friedrich Dreyer
parent 9a3fc08dd4
commit c597dfb917
40 changed files with 75 additions and 70 deletions
+1 -1
View File
@@ -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()