Skip to content

Commit

Permalink
fix(connection): allow more connection callbacks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stephenplusplus committed Sep 18, 2014
1 parent 812bace commit d76903e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/common/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ module.exports.Token = Token;
*/
function Connection(opts) {
events.EventEmitter.call(this);
this.setMaxListeners(0);

opts = opts || {};

Expand Down

0 comments on commit d76903e

Please sign in to comment.