Do not use retry backoff in PubSub

This commit is contained in:
Vladimir Mihailenco 2020-09-17 12:54:48 +03:00
parent c89ef0aacf
commit 76f1e50d50
1 changed files with 2 additions and 6 deletions

View File

@ -528,7 +528,7 @@ func (c *PubSub) initMsgChan(size int) {
return
}
if errCount > 0 {
time.Sleep(c.retryBackoff(errCount))
time.Sleep(100 * time.Millisecond)
}
errCount++
continue
@ -586,7 +586,7 @@ func (c *PubSub) initAllChan(size int) {
return
}
if errCount > 0 {
time.Sleep(c.retryBackoff(errCount))
time.Sleep(100 * time.Millisecond)
}
errCount++
continue
@ -627,7 +627,3 @@ func (c *PubSub) sendMessage(msg interface{}, timer *time.Timer) {
"redis: %s channel is full for %s (message is dropped)", c, pingTimeout)
}
}
func (c *PubSub) retryBackoff(attempt int) time.Duration {
return internal.RetryBackoff(attempt, c.opt.MinRetryBackoff, c.opt.MaxRetryBackoff)
}