Skip to content

Commit

Permalink
Merge pull request #1394 from esl/fix-rdbms-backoff-calculation
Browse files Browse the repository at this point in the history
Fix backoff calculation for RDBMS reconnection.
  • Loading branch information
michalwski committed Jul 20, 2017
2 parents 4b3da05 + 5037edf commit 588ca0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/ejabberd/src/rdbms/mongoose_rdbms.erl
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ connect(Settings, Retry, RetryAfter, MaxRetryDelay) ->
" Retrying in ~p seconds.", [Settings, Error, SleepFor]),
timer:sleep(timer:seconds(SleepFor)),
NextRetryDelay = RetryAfter * RetryAfter,
connect(Settings, Retry - 1, max(MaxRetryDelay, NextRetryDelay), MaxRetryDelay)
connect(Settings, Retry - 1, min(MaxRetryDelay, NextRetryDelay), MaxRetryDelay)
end.


Expand Down

0 comments on commit 588ca0f

Please sign in to comment.