Merge branch 'master' into url

This commit is contained in:
Livio Amstutz 2021-04-19 13:38:13 +02:00
commit 928ba0bc57
6 changed files with 19 additions and 15 deletions

View file

@ -97,7 +97,11 @@ func StartServer(ctx context.Context, port string) {
go func() {
<-ctx.Done()
err := server.Shutdown(ctx)
log.Fatalf("Shutdown(): %v", err)
ctxShutdown, cancelShutdown := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelShutdown()
err := server.Shutdown(ctxShutdown)
if err != nil {
log.Fatalf("Shutdown(): %v", err)
}
}()
}