From ee852bf060e730078fc86603750b31b172b74caf Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 27 Aug 2017 18:21:14 +0100 Subject: [PATCH] Bump event listener limit up to 100 to close #327 --- social/pushbullet/57-pushbullet.js | 9 +++------ social/pushbullet/package.json | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/social/pushbullet/57-pushbullet.js b/social/pushbullet/57-pushbullet.js index ec5ee553..89708e51 100644 --- a/social/pushbullet/57-pushbullet.js +++ b/social/pushbullet/57-pushbullet.js @@ -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 }); } }; diff --git a/social/pushbullet/package.json b/social/pushbullet/package.json index 82eead26..c8a98d72 100644 --- a/social/pushbullet/package.json +++ b/social/pushbullet/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-pushbullet", - "version" : "0.0.11", + "version" : "0.0.12", "description" : "A Node-RED node to send alerts via Pushbullet", "dependencies" : { "pushbullet": "~1.4.3",