From 0ff54c0f8378e1ed9931479ea3124224bfa1fd5b 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. (cherry picked from commit b0e4f8567205e8fb483fa8896d577853f6107e50) --- 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 6f98935fab7f..6a22132080f9 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 }