Skip to content

Commit e6aac85

Browse files
bug fixed
1 parent f53ecc6 commit e6aac85

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/cursor/abstract_cursor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,9 +1039,7 @@ export abstract class AbstractCursor<
10391039
this.selectedServer &&
10401040
!this.cursorSession.hasEnded
10411041
) {
1042-
this.isKilled = true;
10431042
const cursorId = this.cursorId;
1044-
this.cursorId = Long.ZERO;
10451043

10461044
await executeOperation(
10471045
this.cursorClient,
@@ -1061,6 +1059,8 @@ export abstract class AbstractCursor<
10611059
if (!this.cursorSession?.inTransaction()) {
10621060
maybeClearPinnedConnection(this.cursorSession, { error });
10631061
}
1062+
this.cursorId = Long.ZERO;
1063+
this.isKilled = true;
10641064
} finally {
10651065
this.emitClose();
10661066
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rm -rf data
2+
killall mongod
3+
killall mongos
4+
5+
test/tools/cluster_setup.sh replica_set
6+
export MONGODB_URI='mongodb://bob:pwd123@localhost:31000,localhost:31001,localhost:31002/?replicaSet=rs'

0 commit comments

Comments
 (0)