From 4bb6e76b20a3f8fd49fb4677b189b41088f3a962 Mon Sep 17 00:00:00 2001 From: Brandon Diamond Date: Fri, 22 Jun 2012 12:04:22 -0400 Subject: SERVER-4291: Return code of recv unchecked Signed-off-by: Tad Marshall --- client/dbclientcursor.cpp | 7 ++++--- 1 file 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 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 ) { -- cgit v1.2.1