Merge pull request #74 from EqualMedia/master

Pass cursor payload to instrumentation even if there's no logger.
This commit is contained in:
Kyle Banker 2011-12-13 12:14:39 -08:00
commit 26090dbbdd

View File

@ -463,9 +463,8 @@ module Mongo
def send_initial_query def send_initial_query
message = construct_query_message message = construct_query_message
payload = instrument_payload if @logger
sock = @socket || checkout_socket_from_connection sock = @socket || checkout_socket_from_connection
instrument(:find, payload) do instrument(:find, instrument_payload) do
begin begin
results, @n_received, @cursor_id = @connection.receive_message( results, @n_received, @cursor_id = @connection.receive_message(
Mongo::Constants::OP_QUERY, message, nil, sock, @command, Mongo::Constants::OP_QUERY, message, nil, sock, @command,