mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
parent
9a17460b0e
commit
ee852bf060
@ -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
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user