Skip to content

Commit d32ef63

Browse files
committed
Set max listeners on Agent to unlimited.
This fixes a warning on node v0.10.25: "warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit."
1 parent 0905e9a commit d32ef63

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/http.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@ function getTLS(options, callback) {
800800

801801
function Agent(options) {
802802
EventEmitter.call(this);
803+
this.setMaxListeners(0);
803804

804805
options = util._extend({}, options);
805806

0 commit comments

Comments
 (0)