lib/mongo/retryable.rb in mongo-2.19.3 vs lib/mongo/retryable.rb in mongo-2.20.0
- old
+ new
@@ -44,11 +44,11 @@
# write worker delegates, as needed.
#
# @api private
#
# @return [ Mongo::Server ] A server matching the server preference.
- def select_server(cluster, server_selector, session)
- server_selector.select_server(cluster, nil, session)
+ def select_server(cluster, server_selector, session, failed_server = nil)
+ server_selector.select_server(cluster, nil, session, deprioritized: [failed_server].compact)
end
# Returns the read worker for handling retryable reads.
#
# @api private