From 14593954fa672758c1ac66eb7966fe38c6b92d6d Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Wed, 26 Oct 2011 10:28:06 -0400 Subject: [PATCH] RUBY-352 Ensure commands are sent to primary. --- lib/mongo/cursor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo/cursor.rb b/lib/mongo/cursor.rb index 086ac1f..cf642fd 100644 --- a/lib/mongo/cursor.rb +++ b/lib/mongo/cursor.rb @@ -515,7 +515,7 @@ module Mongo def checkout_socket_from_connection @checkin_connection = true - if @read_preference == :primary + if @command || @read_preference == :primary @connection.checkout_writer else @read_pool = @connection.read_pool