diff options
author | Aaron <aaron@10gen.com> | 2010-02-23 13:54:34 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2010-02-23 13:54:34 -0800 |
commit | 211ae74188aff87306787df40a176e558aa92d37 (patch) | |
tree | cea5308dc7d1bf9a53985e0fc7cd6948a2182f3d /shell | |
parent | 804a3917eefe93a1147839d706ba211ce45d8543 (diff) | |
download | mongo-211ae74188aff87306787df40a176e558aa92d37.tar.gz |
SERVER-661 shell keeps going if can't get its uri - to be compatible with 1.2
Diffstat (limited to 'shell')
-rw-r--r-- | shell/utils.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/shell/utils.cpp b/shell/utils.cpp index 38d3b620860..6b44a05afe5 100644 --- a/shell/utils.cpp +++ b/shell/utils.cpp @@ -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(); + } } } } |