1
0
mirror of https://github.com/redis/go-redis.git synced 2025-09-08 19:52:07 +03:00

DialTimeout defaults back to 5 seconds

This commit is contained in:
Nedyalko Dyakov
2025-09-04 17:51:28 +03:00
parent 8aecdb890a
commit 0196b9a9bd
4 changed files with 46 additions and 46 deletions

View File

@@ -109,7 +109,7 @@ type Options struct {
// DialTimeout for establishing new connections.
//
// default: 10 seconds
// default: 5 seconds
DialTimeout time.Duration
// DialerRetries is the maximum number of retry attempts when dialing fails.
@@ -285,7 +285,7 @@ func (opt *Options) init() {
opt.Protocol = 3
}
if opt.DialTimeout == 0 {
opt.DialTimeout = 10 * time.Second
opt.DialTimeout = 5 * time.Second
}
if opt.DialerRetries == 0 {
opt.DialerRetries = 5