Skip to content

Commit

Permalink
Ensure error responds to #retryable?
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmo committed Jun 13, 2024
1 parent df174e5 commit 6322113
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongo/retryable/read_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def legacy_read_with_retry(session, server_selector, &block)

if is_retryable_exception?(e)
raise e if attempt > client.max_read_retries || session&.in_transaction?
elsif e.retryable? && !session&.in_transaction?
elsif e.respond_to?(:retryable?) && e.retryable? && !session&.in_transaction?
raise e if attempt > client.max_read_retries
else
raise e
Expand Down

0 comments on commit 6322113

Please sign in to comment.