mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Patch to suppoer use strict
Fixes Issue #205 Manual merge due to other changes
This commit is contained in:
parent
55245610dd
commit
6f981d29ec
@ -15,6 +15,7 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
module.exports = function(RED) {
|
module.exports = function(RED) {
|
||||||
|
"use strict";
|
||||||
var reconnectTime = RED.settings.socketReconnectTime||10000;
|
var reconnectTime = RED.settings.socketReconnectTime||10000;
|
||||||
var socketTimeout = RED.settings.socketTimeout||null;
|
var socketTimeout = RED.settings.socketTimeout||null;
|
||||||
var net = require('net');
|
var net = require('net');
|
||||||
@ -38,7 +39,7 @@ module.exports = function(RED) {
|
|||||||
var buffer = null;
|
var buffer = null;
|
||||||
var client;
|
var client;
|
||||||
var reconnectTimeout;
|
var reconnectTimeout;
|
||||||
function setupTcpClient() {
|
var setupTcpClient = function() {
|
||||||
node.log("connecting to "+node.host+":"+node.port);
|
node.log("connecting to "+node.host+":"+node.port);
|
||||||
node.status({fill:"grey",shape:"dot",text:"connecting"},true);
|
node.status({fill:"grey",shape:"dot",text:"connecting"},true);
|
||||||
var id = (1+Math.random()*4294967295).toString(16);
|
var id = (1+Math.random()*4294967295).toString(16);
|
||||||
@ -195,7 +196,7 @@ module.exports = function(RED) {
|
|||||||
var client = null;
|
var client = null;
|
||||||
var connected = false;
|
var connected = false;
|
||||||
|
|
||||||
function setupTcpClient() {
|
var setupTcpClient = function() {
|
||||||
node.log("connecting to "+node.host+":"+node.port);
|
node.log("connecting to "+node.host+":"+node.port);
|
||||||
node.status({fill:"grey",shape:"dot",text:"connecting"},true);
|
node.status({fill:"grey",shape:"dot",text:"connecting"},true);
|
||||||
client = net.connect(node.port, node.host, function() {
|
client = net.connect(node.port, node.host, function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user