Clamp initial value of HH retry interval

This could happen due to misconfiguration, so do something sensible in
that case.
pull/4284/head
Philip O'Toole 2015-10-01 12:04:06 -07:00
parent c7599e0409
commit 8a1e5a9e53
1 changed files with 3 additions and 0 deletions

View File

@ -120,6 +120,9 @@ func (s *Service) WriteShard(shardID, ownerID uint64, points []models.Point) err
func (s *Service) retryWrites() {
defer s.wg.Done()
currInterval := time.Duration(s.cfg.RetryInterval)
if currInterval > time.Duration(s.cfg.RetryMaxInterval) {
currInterval = time.Duration(s.cfg.RetryMaxInterval)
}
for {