minor optimization

This commit is contained in:
AJ ONeal 2018-05-31 06:18:02 +00:00
parent 05cb157cfc
commit 643b5a62ea
2 changed files with 3 additions and 2 deletions

View File

@ -154,7 +154,8 @@ function applyConfig(config) {
state.tcp[port].listen(port, function () {
console.log('listening plain TCP on ' + port);
});
state.tcp[port].on('connection', function (conn) { netConnHandlers.tcp(conn, port); });
//state.tcp[port].on('connection', function (conn) { netConnHandlers.tcp(conn, port); });
state.tcp[port].on('connection', netConnHandlers.tcp);
});
//});
}

View File

@ -54,7 +54,7 @@ module.exports.createTcpConnectionHandler = function (copts) {
var Devices = copts.Devices;
return function onTcpConnection(conn, serviceport) {
console.log('[new conn] from port', serviceport);
serviceport = serviceport || conn.localPort;
// this works when I put it here, but I don't know if it's tls yet here
// httpsServer.emit('connection', socket);
//tls3000.emit('connection', socket);