Skip to content

Commit d76903e

Browse files
fix(connection): allow more connection callbacks
Node's default limit for max listeners on an event emitter is at a low 10. We are using an event emitter internally in the Connection class to handle queueing callbacks for the token retrieval event. The default of 10 is now lifted to unlimited, so the developer doesn't have to worry about overriding the default themselves. Fixes googleapis#223
1 parent 812bace commit d76903e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/common/connection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ module.exports.Token = Token;
9494
*/
9595
function Connection(opts) {
9696
events.EventEmitter.call(this);
97+
this.setMaxListeners(0);
9798

9899
opts = opts || {};
99100

0 commit comments

Comments
 (0)