mirror of
https://github.com/prometheus/prometheus
synced 2024-12-25 07:52:28 +00: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
@ -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 New Issue
Block a user