minor: kill cursors only when necessary

This commit is contained in:
Kyle Banker 2010-08-06 16:02:51 -04:00
parent feb09547e7
commit 7bb59610b7
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ module Mongo
#
# @return [True]
def close
if @cursor_id
if @cursor_id && @cursor_id != 0
message = BSON::ByteBuffer.new([0, 0, 0, 0])
message.put_int(1)
message.put_long(@cursor_id)