diff --git a/io/stomp/18-stomp.js b/io/stomp/18-stomp.js index 698aab37..97a2ec22 100644 --- a/io/stomp/18-stomp.js +++ b/io/stomp/18-stomp.js @@ -148,7 +148,7 @@ module.exports = function(RED) { node.connectedCallbacks.shift().call(); } }); - } else { + } else if (node.connected) { // Execute callback directly as the connection to the STOMP server has already been made callback(); }