diff --git a/lib/wireprotocol/command.js b/lib/wireprotocol/command.js index 3168643af..48a759e1c 100644 --- a/lib/wireprotocol/command.js +++ b/lib/wireprotocol/command.js @@ -27,7 +27,7 @@ function command(server, ns, cmd, options, callback) { let finalCmd = Object.assign({}, cmd); if ( isSharded(server) && - shouldUseOpMsg && + !shouldUseOpMsg && readPreference && readPreference.preference !== 'primary' ) {