Change scope of clients object

This commit is contained in:
Nathanaël Lécaudé 2016-11-09 22:33:55 -05:00
parent d56fce37dd
commit 385d9f16e9
1 changed files with 2 additions and 2 deletions

View File

@ -385,8 +385,6 @@ module.exports = function(RED) {
} }
RED.nodes.registerType("tcp out",TcpOut); RED.nodes.registerType("tcp out",TcpOut);
var clients = {};
function TcpGet(n) { function TcpGet(n) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
this.server = n.server; this.server = n.server;
@ -412,6 +410,8 @@ module.exports = function(RED) {
this.connected = false; this.connected = false;
var node = this; var node = this;
var clients = {};
this.on("input", function(msg) { this.on("input", function(msg) {
var i = 0; var i = 0;
if ((!Buffer.isBuffer(msg.payload)) && (typeof msg.payload !== "string")) { if ((!Buffer.isBuffer(msg.payload)) && (typeof msg.payload !== "string")) {