Skip to content

Commit

Permalink
Merge pull request elastic#1814 from adioss/resetFail
Browse files Browse the repository at this point in the history
Backoff is not reset correctly after a correct ack is sent
  • Loading branch information
Steffen Siering committed Jun 8, 2016
2 parents 870fba3 + d3ea523 commit 8527545
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libbeat/outputs/mode/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func (s *SingleConnectionMode) publish(
goto sendFail
}

backoffCount = 0
debug("send completed")
outputs.SignalCompleted(signaler)
return nil
Expand All @@ -141,6 +142,7 @@ func (s *SingleConnectionMode) publish(
if resetFail {
debug("reset fails")
fails = 0
backoffCount = 0
}

if !guaranteed && (s.maxAttempts > 0 && fails == s.maxAttempts) {
Expand Down

0 comments on commit 8527545

Please sign in to comment.