fix: reset `ReadTimeout`&`ReadTimeout` for sentinel mode through ssh

This commit is contained in:
Joanne Tweed 2024-10-14 16:20:49 +08:00 committed by GitHub
parent 3f5b63a36f
commit ca9f0a08e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

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 {