fix: check for non-zero cooldown period
Signed-off-by: Shiva Pentakota <spentakota@vmware.com>
This commit is contained in:
parent
711b72932a
commit
5c3fc2e477
1 changed files with 4 additions and 2 deletions
|
|
@ -187,8 +187,10 @@ func (sc *PollingShardConsumer) getRecords() error {
|
|||
continue
|
||||
}
|
||||
if err == maxBytesExceededError {
|
||||
log.Infof("maxBytesExceededError so sleep for %+v seconds", coolDownPeriod)
|
||||
time.Sleep(time.Duration(coolDownPeriod) * time.Second)
|
||||
if coolDownPeriod != 0 {
|
||||
log.Infof("maxBytesExceededError so sleep for %+v seconds", coolDownPeriod)
|
||||
time.Sleep(time.Duration(coolDownPeriod) * time.Second)
|
||||
}
|
||||
continue
|
||||
}
|
||||
if errors.As(err, &kmsThrottlingErr) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue