From 6bb1441330fbc82a0c52d9696c7670d7a4f6c1a0 Mon Sep 17 00:00:00 2001 From: si458 Date: Sun, 10 Aug 2025 22:33:05 +0100 Subject: [PATCH] fix for amt v19+ with cira #7207 #7213 Signed-off-by: si458 --- amtmanager.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/amtmanager.js b/amtmanager.js index d7fb5bbe..24e76e02 100644 --- a/amtmanager.js +++ b/amtmanager.js @@ -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) {