mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
mraa-gpio-din: add cleanup on close
Required as nodejs will only lazily delete the node objects, and we may race with the next user requesting the resources. ISR thread release. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
This commit is contained in:
parent
6790e95bbb
commit
f2d3c650b3
@ -50,6 +50,8 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
this.on('close', function() {
|
this.on('close', function() {
|
||||||
node.x.isr(m.EDGE_BOTH, null);
|
node.x.isr(m.EDGE_BOTH, null);
|
||||||
|
node.x.isrExit();
|
||||||
|
node.x.close();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
RED.nodes.registerType("mraa-gpio-din", gpioDin);
|
RED.nodes.registerType("mraa-gpio-din", gpioDin);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user