Skip to content

Commit b9c34d5

Browse files
committed
set _closed to true
1 parent 1c59f25 commit b9c34d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/cursor/aggregationCursor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ AggregationCursor.prototype._destroy = function _destroy(_err, callback) {
218218
waitForCursor
219219
.then(() => this.cursor.close())
220220
.then(() => {
221-
this._closed = false;
221+
this._closed = true;
222222
callback();
223223
})
224224
.catch(error => {

lib/cursor/queryCursor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ QueryCursor.prototype._destroy = function _destroy(_err, callback) {
262262
this.cursor.close();
263263
})
264264
.then(() => {
265-
this._closed = false;
265+
this._closed = true;
266266
callback();
267267
})
268268
.catch(error => {

0 commit comments

Comments
 (0)