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; }
|
||||
});
|
||||
this.on("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.on("close", function(done) {
|
||||
if (blink1 && typeof blink1.close === "function") {
|
||||
//This ought to work but seems to cause more hangs on closing than not...
|
||||
blink1.close(function() { done() });
|
||||
}
|
||||
else { done(); }
|
||||
blink1 = null;
|
||||
});
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "node-red-node-blink1",
|
||||
"version" : "0.0.9",
|
||||
"version" : "0.0.11",
|
||||
"description" : "A Node-RED node to control a Thingm Blink(1)",
|
||||
"dependencies" : {
|
||||
"node-blink1" : "0.2.1"
|
||||
"node-blink1" : "0.2.2"
|
||||
},
|
||||
"repository" : {
|
||||
"type":"git",
|
||||
|
Loading…
Reference in New Issue
Block a user