Skip to content

Commit 4ae41ed

Browse files
committed
send the instrument payload even if no logger, for benefit of anyone hooking into instrument method. also matches behaviour of insert, update, remove methods
1 parent 4ed709f commit 4ae41ed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/mongo/cursor.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,8 @@ def refresh
463463

464464
def send_initial_query
465465
message = construct_query_message
466-
payload = instrument_payload if @logger
467466
sock = @socket || checkout_socket_from_connection
468-
instrument(:find, payload) do
467+
instrument(:find, instrument_payload) do
469468
begin
470469
results, @n_received, @cursor_id = @connection.receive_message(
471470
Mongo::Constants::OP_QUERY, message, nil, sock, @command,

0 commit comments

Comments
 (0)