send the instrument payload even if no logger, for benefit of anyone hooking into `instrument` method. also matches behaviour of insert, update, remove methods

This commit is contained in:
Ben Symonds 2011-12-13 18:38:06 +00:00
parent 4ed709ff7f
commit 4ae41edfe4
1 changed files with 1 additions and 2 deletions

View File

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