From a142bfa5f22336acdde8d5c7fe3627fe4b527bd8 Mon Sep 17 00:00:00 2001 From: Martin Boonk Date: Sat, 2 Jul 2022 10:17:38 +0200 Subject: [PATCH] bthrm - Reset retry time for all causes but connection timeout --- apps/bthrm/boot.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/bthrm/boot.js b/apps/bthrm/boot.js index b7f0dcbbd..bfd7e1d31 100644 --- a/apps/bthrm/boot.js +++ b/apps/bthrm/boot.js @@ -244,7 +244,10 @@ log("Clearing timeout " + currentRetryTimeout); clearTimeout(currentRetryTimeout); currentRetryTimeout = undefined; - if (resetTime) retryTime = initialRetryTime; + } + if (resetTime) { + log("Resetting retry time"); + retryTime = initialRetryTime; } }; @@ -277,7 +280,7 @@ log("Disconnect: " + reason); log("GATT", gatt); log("Characteristics", characteristics); - clearRetryTimeout(); + clearRetryTimeout(reason != "Connection Timeout"); supportedCharacteristics["0x2a37"].active = false; startFallback(); blockInit = false;