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;
|
var self = this;
|
||||||
if (this.pusher) {
|
if (this.pusher) {
|
||||||
var stream = this.pusher.stream();
|
var stream = this.pusher.stream();
|
||||||
|
stream.setMaxListeners(100);
|
||||||
var closing = false;
|
var closing = false;
|
||||||
var tout;
|
var tout;
|
||||||
stream.on('message', function(res) {
|
stream.on('message', function(res) {
|
||||||
@ -144,12 +145,8 @@ module.exports = function(RED) {
|
|||||||
this.on("close",function() {
|
this.on("close",function() {
|
||||||
if (tout) { clearTimeout(tout); }
|
if (tout) { clearTimeout(tout); }
|
||||||
closing = true;
|
closing = true;
|
||||||
try {
|
try { this.stream.close(); }
|
||||||
this.stream.close();
|
catch(err) { } // Ignore error if not connected
|
||||||
}
|
|
||||||
catch(err) {
|
|
||||||
// Ignore error if not connected
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-pushbullet",
|
"name" : "node-red-node-pushbullet",
|
||||||
"version" : "0.0.11",
|
"version" : "0.0.12",
|
||||||
"description" : "A Node-RED node to send alerts via Pushbullet",
|
"description" : "A Node-RED node to send alerts via Pushbullet",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"pushbullet": "~1.4.3",
|
"pushbullet": "~1.4.3",
|
||||||
|
Loading…
Reference in New Issue
Block a user