diff --git a/io/mqlight/mqlight.js b/io/mqlight/mqlight.js index 88ca0a1a..471b8a9e 100644 --- a/io/mqlight/mqlight.js +++ b/io/mqlight/mqlight.js @@ -48,11 +48,10 @@ module.exports = function(RED) { if (node.serviceConfig) { if (node.serviceConfig.client) { - var recvClient; + var recvClient = node.serviceConfig.client; recvClient.on("error", function(err) { if (err) { node.error(err.toString()); } }); - recvClient = node.serviceConfig.client; recvClient.on("started", function() { recvClient.on("message", function(data, delivery) { if (node.topic === delivery.destination.topicPattern) { @@ -105,11 +104,10 @@ module.exports = function(RED) { if (node.serviceConfig) { if (node.serviceConfig.client) { - var sendClient; + var sendClient = node.serviceConfig.client; sendClient.on("error", function(err) { if (err) { node.error(err.toString()); } }); - sendClient = node.serviceConfig.client; sendClient.on("started", function () { node.on("input", function(msg) { var topic = node.topic; diff --git a/io/mqlight/package.json b/io/mqlight/package.json index 02f89477..1cc79129 100644 --- a/io/mqlight/package.json +++ b/io/mqlight/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-mqlight", - "version" : "0.0.10", + "version" : "0.0.11", "description" : "A Node-RED node to send and receive message from IBM MQ Light", "dependencies" : { "mqlight" : "1.0.x"