Update 31-tcpin.js

don't send if payload not defined.
This commit is contained in:
Dave Conway-Jones
2023-11-01 12:27:11 +00:00
parent f2cb5ea44e
commit bfe5a8a986

View File

@@ -831,7 +831,9 @@ module.exports = function(RED) {
else if (!clients[connection_id].connecting && clients[connection_id].connected) {
if (clients[connection_id] && clients[connection_id].client) {
let event = dequeue(clients[connection_id].msgQueue)
clients[connection_id].client.write(event.msg.payload);
if (event.msg.payload !== undefined ) {
clients[connection_id].client.write(event.msg.payload);
}
event.nodeDone();
}
}