mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Stomp node - call close with callback correctly.
This commit is contained in:
parent
db0047379f
commit
18c866b490
@ -90,9 +90,7 @@ module.exports = function(RED) {
|
||||
node.on("close", function(done) {
|
||||
closing = true;
|
||||
if (node.client) {
|
||||
node.client.on("disconnect", function() { done(); });
|
||||
//node.client.unsubscribe(node.topic);
|
||||
node.client.disconnect();
|
||||
node.client.disconnect(function() { done(); });
|
||||
}
|
||||
else { done(); }
|
||||
});
|
||||
@ -143,8 +141,7 @@ module.exports = function(RED) {
|
||||
node.on("close", function(done) {
|
||||
closing = true;
|
||||
if (node.client) {
|
||||
node.client.on("disconnect", function() { done(); });
|
||||
node.client.disconnect();
|
||||
node.client.disconnect(function() { done(); });
|
||||
}
|
||||
else { done(); }
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-stomp",
|
||||
"version" : "0.0.4",
|
||||
"version" : "0.0.5",
|
||||
"description" : "A Node-RED node to publish and subscribe to/from a Stomp server",
|
||||
"dependencies" : {
|
||||
"stomp-client" : "0.6.2"
|
||||
|
Loading…
Reference in New Issue
Block a user