fix for amt v19+ with cira #7207 #7213

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2025-08-10 22:33:05 +01:00
parent b3ca1f9882
commit 6bb1441330

View File

@ -775,9 +775,12 @@ module.exports.CreateAmtManager = function (parent) {
});
} else {
// We got a bad response
if ((dev.conntype != 0) && (dev.tlsfail !== true) && (status == 408)) { // If not using CIRA and we get a 408 error while using TLS, try non-TLS.
if ((dev.connType != 0) && (dev.tlsfail !== false) && (status == 408)) { // If not using CIRA and we get a 408 error while using non-TLS, try TLS.
// non-TLS error on a local connection, try again with TLS
dev.tlsfail = false; dev.intelamt.tls = 1; attemptInitialContact(dev); return;
} else if ((dev.connType != 0) && (dev.tlsfail !== true) && (status == 408)) { // If not using CIRA and we get a 408 error while using TLS, try non-TLS.
// TLS error on a local connection, try again without TLS
dev.tlsfail = true; attemptInitialContact(dev); return;
dev.tlsfail = true; dev.intelamt.tls = 0; attemptInitialContact(dev); return;
} else if (status == 401) {
// Authentication error, see if we can use alternative credentials
if (dev.acctry != null) {