Skip to content

Commit

Permalink
Merge pull request #62 from belltoy/fix/retry-index
Browse files Browse the repository at this point in the history
Fix next index in retry connect_one
  • Loading branch information
zhongwencool authored Apr 1, 2024
2 parents 66a2740 + a09f049 commit 390bc76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eetcd_conn.erl
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ connect_one(Index, Retry, Data, Len) ->
{error, Reason} ->
?LOG_WARNING("~p failed to connect ETCD host: ~p ~p",
[Name, Host, Reason]),
NewIndex = (Index + 1) rem Len + 1,
NewIndex = Index rem Len + 1,
connect_one(NewIndex, Retry - 1, Data, Len)
end
end.
Expand Down

0 comments on commit 390bc76

Please sign in to comment.