Skip to content

Commit edb1335

Browse files
committed
fix(topology): set max listeners to infinity for db event relay
We relay topology events on the `Db` class for legacy compat, so we need to remove limitations on max listeners in case users are operating across many instances. NODE-2123
1 parent 29e5ef7 commit edb1335

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/core/sdam/topology.js

+3
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ class Topology extends EventEmitter {
211211

212212
this.on('topologyDescriptionChanged', this.s.detectTopologyDescriptionChange);
213213
}
214+
215+
// NOTE: remove this when NODE-1709 is resolved
216+
this.setMaxListeners(Infinity);
214217
}
215218

216219
/**

0 commit comments

Comments
 (0)