Skip to content

Commit

Permalink
JAVA-656: Don't checkMaster on slaveOk queries
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthernandez committed Oct 2, 2012
1 parent c81547c commit cf02c8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/com/mongodb/DBTCPConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ public Response call( DB db, DBCollection coll, OutMessage m, ServerAddress host
boolean secondaryOk = !(readPref == ReadPreference.primary());

_checkClosed();
checkMaster( false, !secondaryOk );
if (!secondaryOk)
checkMaster( false, !secondaryOk );

final MyPort mp = _myPort.get();
final DBPort port = mp.get( false , readPref, hostNeeded );
Expand Down

0 comments on commit cf02c8e

Please sign in to comment.