Skip to content

Commit 36129ed

Browse files
aherlihybehackett
authored andcommitted
Don't set the slaveOk bit on getMore and killCursors commands
1 parent 448859b commit 36129ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def get_message(self, dummy0, dummy1, use_cmd=False):
302302
ns = _UJOIN % (self.db, "$cmd")
303303
spec = self.as_command()[0]
304304

305-
return query(4, ns, 0, -1, spec, None, self.codec_options)
305+
return query(0, ns, 0, -1, spec, None, self.codec_options)
306306

307307
return get_more(ns, self.ntoreturn, self.cursor_id)
308308

pymongo/mongo_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ def _process_kill_cursors_queue(self):
959959
with server.get_socket(self.__all_credentials) as sock_info:
960960
if (sock_info.max_wire_version >= 4 and
961961
namespace is not None):
962-
sock_info.command(db, spec, slave_ok=True)
962+
sock_info.command(db, spec)
963963
else:
964964
if publish:
965965
start = datetime.datetime.now()

0 commit comments

Comments
 (0)