|
|
|
|
@ -436,7 +436,8 @@ func main() {
@@ -436,7 +436,8 @@ func main() {
|
|
|
|
|
<-c |
|
|
|
|
|
|
|
|
|
// Create a deadline to wait for. |
|
|
|
|
ctx, cancel := context.WithTimeout(ctx, wait) |
|
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), wait) |
|
|
|
|
defer cancel() |
|
|
|
|
// Doesn't block if no connections, but will otherwise wait |
|
|
|
|
// until the timeout deadline. |
|
|
|
|
srv.Shutdown(ctx) |
|
|
|
|
|