summaryrefslogtreecommitdiff
path: root/client/dbclient_rs.cpp
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2011-01-20 19:34:44 -0500
committerKristina <kristina@10gen.com>2011-01-20 19:35:12 -0500
commita756cf2375574732d77479fe3a4ed1c4138feb4e (patch)
treed38507f22a2a80c74ca1b0d47e1fd57880f12f9b /client/dbclient_rs.cpp
parent0369b127ba35196333f2c0be37aacb9e8490c9ef (diff)
downloadmongo-a756cf2375574732d77479fe3a4ed1c4138feb4e.tar.gz
make c++ client check that rs master is ok before returning it SERVER-2377
Diffstat (limited to 'client/dbclient_rs.cpp')
-rw-r--r--client/dbclient_rs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/dbclient_rs.cpp b/client/dbclient_rs.cpp
index 6c01c03f96e..d3eac86b1de 100644
--- a/client/dbclient_rs.cpp
+++ b/client/dbclient_rs.cpp
@@ -146,7 +146,7 @@ namespace mongo {
HostAndPort ReplicaSetMonitor::getMaster() {
- if ( _master < 0 )
+ if ( _master < 0 || !_nodes[_master].ok )
_check();
uassert( 10009 , str::stream() << "ReplicaSetMonitor no master found for set: " << _name , _master >= 0 );