summaryrefslogtreecommitdiff
path: root/client/dbclient.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2010-08-18 09:26:34 +0200
committerAntonin Kral <a.kral@bobek.cz>2010-08-18 09:26:34 +0200
commit99da8d4003cd4619c8655f4a9db74e567d458e68 (patch)
tree7ffe10ec1cd5f0f86be0b7b6f46a935c5f279046 /client/dbclient.cpp
parent63f119d2d1a2ed62bc492b427fc498c3c3989149 (diff)
parent0a9f6162d232e4fb4b70ca07c4a65c0a12173cfc (diff)
downloadmongodb-99da8d4003cd4619c8655f4a9db74e567d458e68.tar.gz
Merge commit 'upstream/1.6.1'
Diffstat (limited to 'client/dbclient.cpp')
-rw-r--r--client/dbclient.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/dbclient.cpp b/client/dbclient.cpp
index 04b6147..26b1c26 100644
--- a/client/dbclient.cpp
+++ b/client/dbclient.cpp
@@ -1063,6 +1063,18 @@ namespace mongo {
return checkMaster()->findOne(a,b,c,d);
}
+ bool DBClientReplicaSet::isMember( const DBConnector * conn ) const {
+ if ( conn == this )
+ return true;
+
+ for ( unsigned i=0; i<_conns.size(); i++ )
+ if ( _conns[i]->isMember( conn ) )
+ return true;
+
+ return false;
+ }
+
+
bool serverAlive( const string &uri ) {
DBClientConnection c( false, 0, 20 ); // potentially the connection to server could fail while we're checking if it's alive - so use timeouts
string err;