lib/mongo/operation/shared/executable.rb in mongo-2.10.5 vs lib/mongo/operation/shared/executable.rb in mongo-2.11.0.rc0
- old
+ new
@@ -64,23 +64,18 @@
def process_result(result, server)
server.update_cluster_time(result)
if result.not_master? || result.node_recovering?
if result.node_shutting_down?
- disconnect_pool = true
+ keep_pool = false
else
- # Max wire version needs to be checked prior to marking the
- # server unknown
- disconnect_pool = !server.description.server_version_gte?('4.2')
+ # Max wire version needs to be examined while the server is known
+ keep_pool = server.description.server_version_gte?('4.2')
end
- server.unknown!
+ server.unknown!(keep_connection_pool: keep_pool)
- if disconnect_pool
- server.pool.disconnect!
- end
-
- server.monitor.scan_semaphore.signal
+ server.scan_semaphore.signal
end
session.process(result) if session
result
end