mirror of
https://github.com/bitinflow/localtunnel.git
synced 2026-03-19 08:25:54 +00:00
Increase max event listeners to prevent premature memory-leak warnings #71
This commit is contained in:
@@ -73,6 +73,10 @@ Tunnel.prototype._init = function(cb) {
|
|||||||
Tunnel.prototype._establish = function(info) {
|
Tunnel.prototype._establish = function(info) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var opt = self._opt;
|
var opt = self._opt;
|
||||||
|
|
||||||
|
// increase max event listeners so that localtunnel consumers don't get
|
||||||
|
// warning messages as soon as they setup even one listener. See #71
|
||||||
|
self.setMaxListeners(info.max_conn + (EventEmitter.defaultMaxListeners || 10));
|
||||||
|
|
||||||
info.local_host = opt.local_host;
|
info.local_host = opt.local_host;
|
||||||
info.local_port = opt.port;
|
info.local_port = opt.port;
|
||||||
|
|||||||
Reference in New Issue
Block a user