From b0e4f8567205e8fb483fa8896d577853f6107e50 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 12 Sep 2024 01:15:52 +0200 Subject: [PATCH] Do not cancel context on Connection.Close (#40769) This commit removes a call to conn.cancelReqs() that causes the Connection to be unusable after Close() is called, leading to the bug described by https://github.com/elastic/beats/issues/40705. --- libbeat/esleg/eslegclient/connection.go | 1 - 1 file changed, 1 deletion(-) diff --git a/libbeat/esleg/eslegclient/connection.go b/libbeat/esleg/eslegclient/connection.go index 6f98935fab7..6a22132080f 100644 --- a/libbeat/esleg/eslegclient/connection.go +++ b/libbeat/esleg/eslegclient/connection.go @@ -326,7 +326,6 @@ func (conn *Connection) Ping() (ESPingData, error) { // Close closes a connection. func (conn *Connection) Close() error { conn.HTTP.CloseIdleConnections() - conn.cancelReqs() return nil }