From 68f9328bffecdccd7199d6f5f461ee94084f7f6b Mon Sep 17 00:00:00 2001 From: doingodswork Date: Fri, 27 Mar 2020 23:52:32 +0100 Subject: [PATCH] Remove wrong/unecessary comment --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index 23c234c..41954f0 100644 --- a/main.go +++ b/main.go @@ -193,9 +193,7 @@ func main() { sig := <-c log.Printf("Received signal %v, shutting down...\n", sig) *stoppingPtr = true - // Create a deadline to wait for. - // Using the same value as the server's `WriteTimeout` would be great, because this would mean that every client could finish his request as he normally could. - // But `docker stop` only gives us 10 seconds. + // Create a deadline to wait for. `docker stop` gives us 10 seconds. // No need to get the cancel func and defer calling it, because srv.Shutdown() will consider the timeout from the context. ctx, _ := context.WithTimeout(context.Background(), 9*time.Second) // Doesn't block if no connections, but will otherwise wait until the timeout deadline