summaryrefslogtreecommitdiff
path: root/client/dbclientcursor.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2012-05-10 06:57:57 +0200
committerAntonin Kral <a.kral@bobek.cz>2012-05-10 06:57:57 +0200
commit8813daaab256108f7aa6300875e8562d031f2c2f (patch)
tree06daade9022f76b2775d23f4613817365a2ded99 /client/dbclientcursor.cpp
parentd72a59184a3d51b17b30ed20fe656421bd4d2248 (diff)
parent61619b3142c1de8f60f91964ff2656054d4f11a6 (diff)
downloadmongodb-8813daaab256108f7aa6300875e8562d031f2c2f.tar.gz
Merge tag 'upstream/2.0.5'
Upstream version 2.0.5
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();
}
}