mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Bugfix shared connection
This commit is contained in:
parent
b91aa6a506
commit
0c52d6b8be
@ -59,10 +59,10 @@ module.exports = function(RED) {
|
||||
var node = this;
|
||||
var msg = {topic:this.topic};
|
||||
// Save the client connection to the shared server instance if needed
|
||||
if (!node.server.clientConnection) {
|
||||
node.server.clientConnection = new StompClient(node.stompClientOpts);
|
||||
if (!node.serverConfig.clientConnection) {
|
||||
node.serverConfig.clientConnection = new StompClient(node.stompClientOpts);
|
||||
}
|
||||
node.client = node.server.clientConnection;
|
||||
node.client = node.serverConfig.clientConnection;
|
||||
|
||||
node.client.on("connect", function() {
|
||||
node.status({fill:"green",shape:"dot",text:"connected"});
|
||||
@ -134,10 +134,10 @@ module.exports = function(RED) {
|
||||
|
||||
var node = this;
|
||||
// Save the client connection to the shared server instance if needed
|
||||
if (!node.server.clientConnection) {
|
||||
node.server.clientConnection = new StompClient(node.stompClientOpts);
|
||||
if (!node.serverConfig.clientConnection) {
|
||||
node.serverConfig.clientConnection = new StompClient(node.stompClientOpts);
|
||||
}
|
||||
node.client = node.server.clientConnection;
|
||||
node.client = node.serverConfig.clientConnection;
|
||||
|
||||
node.client.on("connect", function() {
|
||||
node.status({fill:"green",shape:"dot",text:"connected"});
|
||||
@ -203,10 +203,10 @@ module.exports = function(RED) {
|
||||
// only start connection etc. when acknowledgements are configured to be send by client
|
||||
if (node.serverConfig.ack) {
|
||||
// Save the client connection to the shared server instance if needed
|
||||
if (!node.server.clientConnection) {
|
||||
node.server.clientConnection = new StompClient(node.stompClientOpts);
|
||||
if (!node.serverConfig.clientConnection) {
|
||||
node.serverConfig.clientConnection = new StompClient(node.stompClientOpts);
|
||||
}
|
||||
node.client = node.server.clientConnection;
|
||||
node.client = node.serverConfig.clientConnection;
|
||||
|
||||
node.client.on("connect", function() {
|
||||
node.status({fill:"green",shape:"dot",text:"connected"});
|
||||
|
Loading…
x
Reference in New Issue
Block a user