From 5538c64e8edaf770208e79214841a52d9d95e5b0 Mon Sep 17 00:00:00 2001 From: lzhfromustc <43191155+lzhfromustc@users.noreply.github.com> Date: Tue, 23 Nov 2021 00:58:17 -0800 Subject: [PATCH] web:Fix a potential goroutine leak by channel (#8965) Signed-off-by: lzhfromustc --- web/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/web.go b/web/web.go index d777917ed..01014f426 100644 --- a/web/web.go +++ b/web/web.go @@ -594,7 +594,7 @@ func (h *Handler) Run(ctx context.Context, listener net.Listener, webConfig stri ReadTimeout: h.options.ReadTimeout, } - errCh := make(chan error) + errCh := make(chan error, 1) go func() { errCh <- toolkit_web.Serve(listener, httpSrv, webConfig, h.logger) }()