Skip to content

Commit

Permalink
Short circuit retries first
Browse files Browse the repository at this point in the history
  • Loading branch information
mwoods79 committed Jul 30, 2024
1 parent 47a8e9c commit 34e2989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/broadway_cloud_pub_sub/pull_client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ defmodule BroadwayCloudPubSub.PullClient do
end

defp should_retry(%Response{status: status}, config, retries_left) do
status in retry_codes(config) and retries_left > 0
retries_left > 0 and status in retry_codes(config)
end

defp max_retries(config) do
Expand Down

0 comments on commit 34e2989

Please sign in to comment.