From 4ae41edfe40707026e8f1f3dc8167cbbbfb1623e Mon Sep 17 00:00:00 2001 From: Ben Symonds Date: Tue, 13 Dec 2011 18:38:06 +0000 Subject: [PATCH] send the instrument payload even if no logger, for benefit of anyone hooking into `instrument` method. also matches behaviour of insert, update, remove methods --- lib/mongo/cursor.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/mongo/cursor.rb b/lib/mongo/cursor.rb index 3f44d6e..452913d 100644 --- a/lib/mongo/cursor.rb +++ b/lib/mongo/cursor.rb @@ -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,