From 004869118109adb02d1b040c93bc6b82851db38e Mon Sep 17 00:00:00 2001 From: zhang452110549 Date: Mon, 14 Oct 2024 15:39:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E7=94=B1=E4=BA=8Esent?= =?UTF-8?q?inel=E5=88=9D=E5=A7=8B=E5=8C=96client=E5=90=8E=E9=87=8D?= =?UTF-8?q?=E7=BD=AEoption=E5=8F=82=E6=95=B0=E4=B8=ADReadTimeout=E4=B8=8EW?= =?UTF-8?q?riteTimeout=E5=AF=BC=E8=87=B4ssh=E9=9A=A7=E9=81=93=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=8A=A5=E9=94=99ssh:=20tcpChan:=20deadline=20not=20s?= =?UTF-8?q?upported?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/services/connection_service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/services/connection_service.go b/backend/services/connection_service.go index 2d628dc..ca08daf 100644 --- a/backend/services/connection_service.go +++ b/backend/services/connection_service.go @@ -226,6 +226,10 @@ func (c *connectionService) createRedisClient(config types.ConnectionConfig) (re option.Addr = net.JoinHostPort(addr[0], addr[1]) option.Username = config.Sentinel.Username option.Password = config.Sentinel.Password + if option.Dialer != nil { + option.ReadTimeout = -2 + option.WriteTimeout = -2 + } } if config.LastDB > 0 {