mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Update blink1 node to use done() on close.
This commit is contained in:
parent
700d5e342a
commit
d330ce9da5
@ -74,10 +74,12 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
} catch (e) { node.error("Blink1 : device not found"); blink1 = null; }
|
} catch (e) { node.error("Blink1 : device not found"); blink1 = null; }
|
||||||
});
|
});
|
||||||
this.on("close", function() {
|
this.on("close", function(done) {
|
||||||
if (blink1 && typeof blink1.close == "function") {
|
if (blink1 && typeof blink1.close === "function") {
|
||||||
//blink1.close(); //This ought to work but seems to cause more hangs on closing than not...
|
//This ought to work but seems to cause more hangs on closing than not...
|
||||||
|
blink1.close(function() { done() });
|
||||||
}
|
}
|
||||||
|
else { done(); }
|
||||||
blink1 = null;
|
blink1 = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-blink1",
|
"name" : "node-red-node-blink1",
|
||||||
"version" : "0.0.9",
|
"version" : "0.0.11",
|
||||||
"description" : "A Node-RED node to control a Thingm Blink(1)",
|
"description" : "A Node-RED node to control a Thingm Blink(1)",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"node-blink1" : "0.2.1"
|
"node-blink1" : "0.2.2"
|
||||||
},
|
},
|
||||||
"repository" : {
|
"repository" : {
|
||||||
"type":"git",
|
"type":"git",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user