Permalink
Browse files

fix segfault in mongos with some replica set changes

  • Loading branch information...
1 parent 5c71438 commit 5fc7c288e05ef7109e60f08196bd06b4a9ae3ef1 @erh erh committed Jan 24, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 client/dbclient_rs.cpp
View
@@ -446,8 +446,6 @@ namespace mongo {
}
catch( DBException& e ){
warning() << "cannot connect to new host " << *i << " to replica set " << this->_name << causedBy( e ) << endl;
- delete newConn;
- newConn = NULL;
}
_nodes.push_back( Node( h , newConn ) );
@@ -458,6 +456,7 @@ namespace mongo {
bool ReplicaSetMonitor::_checkConnection( DBClientConnection * c , string& maybePrimary , bool verbose , int nodesOffset ) {
+ assert( c );
scoped_lock lk( _checkConnectionLock );
bool isMaster = false;
bool changed = false;

0 comments on commit 5fc7c28

Please sign in to comment.