mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-28 04:02:21 -04:00
web:Fix a potential goroutine leak by channel (#8965)
Signed-off-by: lzhfromustc <lzhfromustc@gmail.com>
This commit is contained in:
parent
f08c89e569
commit
5538c64e8e
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}()
|
||||
|
|
|
|||
Loading…
Reference in a new issue