Skip to content

Commit 26ade5d

Browse files
durranljhaywar
authored andcommitted
fix(sdam): topology no longer causes close event (#2792)
The topology was emitting both a "topologyClosed" and "close" event which are bubbled up to the MongoClient. This was causing two "close" events to be emitted from the MongoClient when the client is closed. NODE-3219
1 parent 8cb03b7 commit 26ade5d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/sdam/topology.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ export class Topology extends EventEmitter {
448448
this.emit(Topology.TOPOLOGY_CLOSED, new TopologyClosedEvent(this.s.id));
449449

450450
stateTransition(this, STATE_CLOSED);
451-
this.emit('close');
452451

453452
if (typeof callback === 'function') {
454453
callback(err);

0 commit comments

Comments
 (0)