summaryrefslogtreecommitdiff
path: root/client/dbclientcursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/dbclientcursor.cpp')
-rw-r--r--client/dbclientcursor.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/client/dbclientcursor.cpp b/client/dbclientcursor.cpp
index 5db360e..9e7e8a6 100644
--- a/client/dbclientcursor.cpp
+++ b/client/dbclientcursor.cpp
@@ -290,12 +290,23 @@ namespace mongo {
m.setData( dbKillCursors , b.buf() , b.len() );
if ( _client ) {
- _client->sayPiggyBack( m );
+
+ // Kill the cursor the same way the connection itself would. Usually, non-lazily
+ if( DBClientConnection::getLazyKillCursor() )
+ _client->sayPiggyBack( m );
+ else
+ _client->say( m );
+
}
else {
assert( _scopedHost.size() );
ScopedDbConnection conn( _scopedHost );
- conn->sayPiggyBack( m );
+
+ if( DBClientConnection::getLazyKillCursor() )
+ conn->sayPiggyBack( m );
+ else
+ conn->say( m );
+
conn.done();
}
}