Fixed server exception when node.host is not set.

This commit is contained in:
Ylian Saint-Hilaire 2022-01-09 11:41:58 -08:00
parent ea8dfab1c1
commit 102a951b1e

View File

@ -214,6 +214,7 @@ module.exports.CreateAmtScanner = function (parent) {
// Look for all Intel AMT computers that may be locally reachable and poll their presence // Look for all Intel AMT computers that may be locally reachable and poll their presence
obj.performSpecificScan = function (node) { obj.performSpecificScan = function (node) {
if ((node == null) || (node.host == null)) return;
var host = node.host.toLowerCase(); var host = node.host.toLowerCase();
const ciraConnections = obj.parent.mpsserver ? obj.parent.mpsserver.GetConnectionToNode(node._id, null, true) : null; // See if any OOB connections are present const ciraConnections = obj.parent.mpsserver ? obj.parent.mpsserver.GetConnectionToNode(node._id, null, true) : null; // See if any OOB connections are present
if ((host != '127.0.0.1') && (host != '::1') && (host.toLowerCase() != 'localhost') && (ciraConnections == null)) { if ((host != '127.0.0.1') && (host != '::1') && (host.toLowerCase() != 'localhost') && (ciraConnections == null)) {