Skip to content

Commit 43e079d

Browse files
committed
PYTHON-2799 Use namespace returned from initial command response for killCursors (#666)
(cherry picked from commit 8675dc0)
1 parent f98c0b9 commit 43e079d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/command_cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __die(self, synchronous=False):
7575
if self.__id and not already_killed:
7676
cursor_id = self.__id
7777
address = _CursorAddress(
78-
self.__address, self.__collection.full_name)
78+
self.__address, self.__ns)
7979
else:
8080
# Skip killCursors.
8181
cursor_id = 0

pymongo/cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def __die(self, synchronous=False):
350350
if self.__id and not already_killed:
351351
cursor_id = self.__id
352352
address = _CursorAddress(
353-
self.__address, self.__collection.full_name)
353+
self.__address, "%s.%s" % (self.__dbname, self.__collname))
354354
else:
355355
# Skip killCursors.
356356
cursor_id = 0

0 commit comments

Comments
 (0)