Skip to content

Commit

Permalink
fix(topology): set max listeners to infinity for db event relay
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mbroadst committed Nov 6, 2019
1 parent 29e5ef7 commit edb1335
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/core/sdam/topology.js
Expand Up @@ -211,6 +211,9 @@ class Topology extends EventEmitter {

this.on('topologyDescriptionChanged', this.s.detectTopologyDescriptionChange);
}

// NOTE: remove this when NODE-1709 is resolved
this.setMaxListeners(Infinity);
}

/**
Expand Down

0 comments on commit edb1335

Please sign in to comment.