fix for amt v19+ with cira #7207 #7213
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Aug 10, 2025 at 22:33 UTC
6bb1441330fbc82a0c52d9696c7670d7a4f6c1a0
1 file changed
+5
-2
amtmanager.js
+5
-2
@@ -775,9 +775,12 @@ module.exports.CreateAmtManager = function (parent) {
775
});
776
} else {
777
// We got a bad response
778
- 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.
778
+ 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.
779
+ // non-TLS error on a local connection, try again with TLS
780
+ dev.tlsfail = false; dev.intelamt.tls = 1; attemptInitialContact(dev); return;
781
+ } 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.
782
// TLS error on a local connection, try again without TLS
780
- dev.tlsfail = true; attemptInitialContact(dev); return;
783
+ dev.tlsfail = true; dev.intelamt.tls = 0; attemptInitialContact(dev); return;
784
} else if (status == 401) {
785
// Authentication error, see if we can use alternative credentials
786
if (dev.acctry != null) {