mirror of
https://github.com/traefik/traefik.git
synced 2025-08-16 03:27:14 +02:00
Make hijackConnectionTracker.Close thread safe
This commit is contained in:
parent
9de3129a55
commit
c5b71592c8
@ -85,6 +85,8 @@ func (h *hijackConnectionTracker) Shutdown(ctx context.Context) error {
|
||||
|
||||
// Close close all the connections in the tracked connections list
|
||||
func (h *hijackConnectionTracker) Close() {
|
||||
h.lock.Lock()
|
||||
defer h.lock.Unlock()
|
||||
for conn := range h.conns {
|
||||
if err := conn.Close(); err != nil {
|
||||
log.Errorf("Error while closing Hijacked conn: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user