Skip to content

Commit

Permalink
Add link to blogpost
Browse files Browse the repository at this point in the history
  • Loading branch information
sylane committed Feb 24, 2025
1 parent a6f99e2 commit ee158fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/grisp_connect_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ connecting(enter, _OldState, #data{retry_count = RetryCount}) ->
%% Calculate the connection delay in milliseconds with exponential backoff.
%% The delay is selected randomly between `1000' and
%% `2 ^ RETRY_COUNT - 1000' with a maximum value of `64000'.
%% Loosely inspired by https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
MinDelay = 1000,
MaxDelay = 64000,
MaxRandomDelay = min(MaxDelay, (1 bsl RetryCount) * 1000) - MinDelay,
Expand Down

0 comments on commit ee158fc

Please sign in to comment.