fix: 修正由于sentinel初始化client后重置option参数中ReadTimeout与WriteTimeout导致ssh隧道连接报错ssh: tcpChan: deadline not supported

This commit is contained in:
zhang452110549 2024-10-14 15:39:14 +08:00
parent 3f5b63a36f
commit 0048691181
1 changed files with 4 additions and 0 deletions
backend/services

View File

@ -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 {