Fixed AgentPort+TlsOffload server crash.

This commit is contained in:
Ylian Saint-Hilaire 2020-05-22 10:43:57 -07:00
parent b57e3df260
commit 9fdb62d862
1 changed files with 1 additions and 1 deletions

View File

@ -4749,7 +4749,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
if (obj.parent.authlog) { obj.parent.authLog('https', 'Server listening on 0.0.0.0 port ' + port + '.'); } if (obj.parent.authlog) { obj.parent.authLog('https', 'Server listening on 0.0.0.0 port ' + port + '.'); }
obj.parent.updateServerState('https-agent-port', port); obj.parent.updateServerState('https-agent-port', port);
} else { } else {
obj.tcpAltServer = obj.app.listen(port, function () { console.log('MeshCentral HTTP agent-only server running on port ' + port + ((agentAliasPort != null) ? (', alias port ' + agentAliasPort) : '') + '.'); }); obj.tcpAltServer = obj.agentapp.listen(port, function () { console.log('MeshCentral HTTP agent-only server running on port ' + port + ((agentAliasPort != null) ? (', alias port ' + agentAliasPort) : '') + '.'); });
obj.parent.updateServerState('http-agent-port', port); obj.parent.updateServerState('http-agent-port', port);
} }
} }