Permalink
Browse files

JAVA-656: Don't checkMaster on slaveOk queries

  • Loading branch information...
scotthernandez committed Oct 1, 2012
1 parent c81547c commit cf02c8eee69fe941f266c5af267a905d0a14718f
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/com/mongodb/DBTCPConnector.java
@@ -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 );

0 comments on commit cf02c8e

Please sign in to comment.