From 0a22df94b2dc9932b4304eba80582fae07e5f10a Mon Sep 17 00:00:00 2001 From: Martin Boonk Date: Sun, 6 Nov 2022 16:11:22 +0100 Subject: [PATCH] bthrm - Use increasing timeouts if device not found --- apps/bthrm/lib.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/bthrm/lib.js b/apps/bthrm/lib.js index dc3578453..652d9ec04 100644 --- a/apps/bthrm/lib.js +++ b/apps/bthrm/lib.js @@ -280,7 +280,11 @@ exports.enable = () => { log("Disconnect: " + reason); log("GATT", gatt); log("Characteristics", characteristics); - clearRetryTimeout(reason != "Connection Timeout"); + + var retryTimeResetNeeded = true; + retryTimeResetNeeded &= reason != "Connection Timeout"; + retryTimeResetNeeded &= reason != "No device found matching filters"; + clearRetryTimeout(retryTimeResetNeeded); supportedCharacteristics["0x2a37"].active = false; startFallback(); blockInit = false;