Call context cancel function after shutdown.

Keeps go vet from complaining.
This commit is contained in:
Juliusz Chroboczek committed 2020-09-18 10:36:05 +02:00
1 parent 2347417f83
commit 5a4db62873
1 file changed
+2 -1
+2 -1
View File
@@ -473,6 +473,7 @@ func serveGroupRecordings(w http.ResponseWriter, r *http.Request, f *os.File, gr
}
func shutdown() {
ctx, _ := context.WithTimeout(context.Background(), 2*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()
server.Shutdown(ctx)
}