From 1f8dd5eccbaf1a41d8f09164a4ea90aed9a477d4 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Thu, 9 May 2024 16:45:24 +0200 Subject: [PATCH] fix: use Dialer DialContext to propagate context correctly (#13113) --- internal/elasticsearch/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/elasticsearch/config.go b/internal/elasticsearch/config.go index 8b9e6a423eb..c61ee7c95e1 100644 --- a/internal/elasticsearch/config.go +++ b/internal/elasticsearch/config.go @@ -147,8 +147,8 @@ func NewHTTPTransport(cfg *Config) (*http.Transport, error) { tlsDialer := transport.TLSDialer(dialer, tlsConfig, cfg.Timeout) return &http.Transport{ Proxy: proxy, - Dial: dialer.Dial, - DialTLS: tlsDialer.Dial, + DialContext: dialer.DialContext, + DialTLSContext: tlsDialer.DialContext, TLSClientConfig: tlsConfig.ToConfig(), MaxIdleConnsPerHost: cfg.MaxIdleConnsPerHost, }, nil