diff options
author | Greg Studer <greg@10gen.com> | 2012-04-24 13:16:15 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2012-05-10 14:49:37 -0400 |
commit | 0397af7906e351942b0c4d228c19ee64ad794bde (patch) | |
tree | 008c4012c11500d87409f5d2bd384f2eab14e51e | |
parent | 2cf91c83a188f74d726836a7cfdfcb6fa95520e5 (diff) | |
download | mongo-0397af7906e351942b0c4d228c19ee64ad794bde.tar.gz |
SERVER-5405 make sure we recycle authenticated conn when done
Conflicts:
client/dbclient_rs.cpp
-rw-r--r-- | client/dbclient_rs.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/dbclient_rs.cpp b/client/dbclient_rs.cpp index 9a5b2f7981e..c792656aa42 100644 --- a/client/dbclient_rs.cpp +++ b/client/dbclient_rs.cpp @@ -313,8 +313,13 @@ namespace mongo { if ( !authenticatedConn->runCommand( "admin", BSON( "replSetGetStatus" << 1 ), status )) { LOG(1) << "dbclient_rs replSetGetStatus failed" << endl; + authenticatedConn.done(); // connection worked properly, but we got an error from server return; } + + // Make sure we return when finished + authenticatedConn.done(); + if( !status.hasField("members") ) { log() << "dbclient_rs error expected members field in replSetGetStatus result" << endl; return; |