Bump event listener limit up to 100

to close #327
This commit is contained in:
Dave Conway-Jones
2017-08-27 18:21:14 +01:00
parent 9a17460b0e
commit ee852bf060
2 changed files with 4 additions and 7 deletions

View File

@@ -110,6 +110,7 @@ module.exports = function(RED) {
var self = this;
if (this.pusher) {
var stream = this.pusher.stream();
stream.setMaxListeners(100);
var closing = false;
var tout;
stream.on('message', function(res) {
@@ -144,12 +145,8 @@ module.exports = function(RED) {
this.on("close",function() {
if (tout) { clearTimeout(tout); }
closing = true;
try {
this.stream.close();
}
catch(err) {
// Ignore error if not connected
}
try { this.stream.close(); }
catch(err) { } // Ignore error if not connected
});
}
};