mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-661 shell keeps going if can't get its uri - to be compatible with 1.2
This commit is contained in:
parent
804a3917ee
commit
211ae74188
@ -697,10 +697,11 @@ namespace mongo {
|
||||
return;
|
||||
}
|
||||
BSONObj info;
|
||||
uassert( 13010, "whatsmyuri failed", c.runCommand( "admin", BSON( "whatsmyuri" << 1 ), info ) );
|
||||
// There's no way to explicitly disconnect a DBClientConnection, but we might allocate
|
||||
// a new uri on automatic reconnect. So just store one uri per connection.
|
||||
_allMyUris[ &c ] = info[ "you" ].str();
|
||||
if ( c.runCommand( "admin", BSON( "whatsmyuri" << 1 ), info ) ) {
|
||||
// There's no way to explicitly disconnect a DBClientConnection, but we might allocate
|
||||
// a new uri on automatic reconnect. So just store one uri per connection.
|
||||
_allMyUris[ &c ] = info[ "you" ].str();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user