1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-07 12:42:55 +03:00

Set error on the commands in case there are no more attempts left

This commit is contained in:
Vladimir Mihailenco
2020-02-02 13:01:57 +02:00
parent 5edc4c8384
commit 45de1c42ae
2 changed files with 64 additions and 51 deletions

View File

@@ -152,6 +152,9 @@ func (opt *Options) init() {
opt.IdleCheckFrequency = time.Minute
}
if opt.MaxRetries == -1 {
opt.MaxRetries = 0
}
switch opt.MinRetryBackoff {
case -1:
opt.MinRetryBackoff = 0