Patch to suppoer use strict

Fixes Issue #205
Manual merge due to other changes
This commit is contained in:
Dave C-J 2014-05-14 11:44:19 +01:00
parent 55245610dd
commit 6f981d29ec
1 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@
**/
module.exports = function(RED) {
"use strict";
var reconnectTime = RED.settings.socketReconnectTime||10000;
var socketTimeout = RED.settings.socketTimeout||null;
var net = require('net');
@ -38,7 +39,7 @@ module.exports = function(RED) {
var buffer = null;
var client;
var reconnectTimeout;
function setupTcpClient() {
var setupTcpClient = function() {
node.log("connecting to "+node.host+":"+node.port);
node.status({fill:"grey",shape:"dot",text:"connecting"},true);
var id = (1+Math.random()*4294967295).toString(16);
@ -195,7 +196,7 @@ module.exports = function(RED) {
var client = null;
var connected = false;
function setupTcpClient() {
var setupTcpClient = function() {
node.log("connecting to "+node.host+":"+node.port);
node.status({fill:"grey",shape:"dot",text:"connecting"},true);
client = net.connect(node.port, node.host, function() {