We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76ae6c8 commit 9168bbcCopy full SHA for 9168bbc
src/cursor/abstract_cursor.ts
@@ -851,7 +851,9 @@ function makeCursorStream<TSchema extends Document>(cursor: AbstractCursor<TSche
851
852
// NOTE: This is also perhaps questionable. The rationale here is that these errors tend
853
// to be "operation interrupted", where a cursor has been closed but there is an
854
- // active getMore in-flight.
+ // active getMore in-flight. This used to check if the cursor was killed but once
855
+ // that changed to happen in cleanup legitimate errors would not destroy the
856
+ // stream. There are change streams test specifically test these cases.
857
if (err.message.match(/interrupted/)) {
858
return readable.push(null);
859
}
0 commit comments