File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,6 @@ class ChangeStream extends EventEmitter {
60
60
61
61
driverChangeStreamEvents . forEach ( ev => {
62
62
this . driverChangeStream . on ( ev , data => {
63
- // Sometimes Node driver still polls after close, so
64
- // avoid any uncaught exceptions due to closed change streams
65
- // See tests for gh-7022
66
- if ( ev === 'error' && this . closed ) {
67
- return ;
68
- }
69
63
if ( data != null && data . fullDocument != null && this . options && this . options . hydrate ) {
70
64
data . fullDocument = this . options . model . hydrate ( data . fullDocument ) ;
71
65
}
@@ -83,12 +77,6 @@ class ChangeStream extends EventEmitter {
83
77
84
78
driverChangeStreamEvents . forEach ( ev => {
85
79
this . driverChangeStream . on ( ev , data => {
86
- // Sometimes Node driver still polls after close, so
87
- // avoid any uncaught exceptions due to closed change streams
88
- // See tests for gh-7022
89
- if ( ev === 'error' && this . closed ) {
90
- return ;
91
- }
92
80
if ( data != null && data . fullDocument != null && this . options && this . options . hydrate ) {
93
81
data . fullDocument = this . options . model . hydrate ( data . fullDocument ) ;
94
82
}
Original file line number Diff line number Diff line change @@ -3546,6 +3546,7 @@ describe('Model', function() {
3546
3546
assert . equal ( changeData . operationType , 'insert' ) ;
3547
3547
assert . equal ( changeData . fullDocument . name , 'Ned Stark' ) ;
3548
3548
3549
+ await changeStream . close ( ) ;
3549
3550
await db . close ( ) ;
3550
3551
} ) ;
3551
3552
You can’t perform that action at this time.
0 commit comments