-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(changeStream): properly handle changeStream event mid-close (#1902)
If a changeStream gets an event while it is in the middle of closing, a race condition can occur where the event is still processed after the stream has closed. This commit adds handling for this edge case by returning an error to callbacks, rejecting promises, and simply ignoring it in emitter mode. Fixes NODE-1831
- Loading branch information
1 parent
e806be4
commit 5ad9fa9
Showing
2 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters