Skip to content

Commit

Permalink
Merge pull request #14740 from orgads/stream-close-promise
Browse files Browse the repository at this point in the history
Fix ChangeStream.close to return a Promise<void> like the driver
  • Loading branch information
vkarpov15 authored Jul 11, 2024
2 parents d30a3b9 + 0fbe1d4 commit 090297e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cursor/changeStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ class ChangeStream extends EventEmitter {
close() {
this.closed = true;
if (this.driverChangeStream) {
this.driverChangeStream.close();
return this.driverChangeStream.close();
}
return Promise.resolve();
}
}

Expand Down

0 comments on commit 090297e

Please sign in to comment.