1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Tcpgetfix: Another small check (#1070)

* TCPget: Add another check for clients[connection_id]
This commit is contained in:
Nathanaël Lécaudé 2016-11-26 16:16:19 -05:00 committed by Dave Conway-Jones
parent b530c1a43d
commit 2084ad318f

View File

@ -467,8 +467,9 @@ module.exports = function(RED) {
else {
for (var j = 0; j < data.length; j++ ) {
if (node.out === "time") {
if (clients[connection_id]) {
// do the timer thing
if (clients[connection_id] && clients[connection_id].timeout) {
if (clients[connection_id].timeout) {
i += 1;
buf[i] = data[j];
}
@ -489,6 +490,7 @@ module.exports = function(RED) {
buf[0] = data[j];
}
}
}
// count bytes into a buffer...
else if (node.out == "count") {
buf[i] = data[j];