瀏覽代碼

Pass context.Background() to server.Shutdown()

DarthSim 1 月之前
父節點
當前提交
4706416d5b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      main.go

+ 1 - 1
main.go

@@ -143,7 +143,7 @@ func run(ctx context.Context) error {
 	if err != nil {
 		return err
 	}
-	defer s.Shutdown(ctx)
+	defer s.Shutdown(context.Background())
 
 	<-ctx.Done()