summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Diamond <brandon@10gen.com>2012-06-22 12:04:22 -0400
committerTad Marshall <tad@10gen.com>2012-06-22 12:09:41 -0400
commit4bb6e76b20a3f8fd49fb4677b189b41088f3a962 (patch)
treed6ea4905d81df93d580b031a8611a36fc6480f7f
parentf45435a02258a537d9f6950bb5aedec965526db9 (diff)
downloadmongo-4bb6e76b20a3f8fd49fb4677b189b41088f3a962.tar.gz
SERVER-4291: Return code of recv unchecked
Signed-off-by: Tad Marshall <tad@10gen.com>
-rw-r--r--client/dbclientcursor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/dbclientcursor.cpp b/client/dbclientcursor.cpp
index 9e7e8a6813e..9da45e5c32d 100644
--- a/client/dbclientcursor.cpp
+++ b/client/dbclientcursor.cpp
@@ -138,9 +138,10 @@ namespace mongo {
assert( !haveLimit );
auto_ptr<Message> response(new Message());
assert( _client );
- _client->recv(*response);
- b.m = response;
- dataReceived();
+ if ( _client->recv(*response) ) {
+ b.m = response;
+ dataReceived();
+ }
}
void DBClientCursor::dataReceived( bool& retry, string& host ) {