1
0
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:
dceejay 2015-04-23 10:05:42 +01:00
parent db0047379f
commit 18c866b490
2 changed files with 3 additions and 6 deletions

View File

@ -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(); }
});

View File

@ -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"