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
|
continue
|
||||||
}
|
}
|
||||||
if err == maxBytesExceededError {
|
if err == maxBytesExceededError {
|
||||||
log.Infof("maxBytesExceededError so sleep for %+v seconds", coolDownPeriod)
|
if coolDownPeriod != 0 {
|
||||||
time.Sleep(time.Duration(coolDownPeriod) * time.Second)
|
log.Infof("maxBytesExceededError so sleep for %+v seconds", coolDownPeriod)
|
||||||
|
time.Sleep(time.Duration(coolDownPeriod) * time.Second)
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if errors.As(err, &kmsThrottlingErr) {
|
if errors.As(err, &kmsThrottlingErr) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue