From 794fabdff23dd08f34d45d038e1cf34a71ec94cb Mon Sep 17 00:00:00 2001 From: Martin Varmuza Date: Mon, 9 Oct 2023 13:40:37 +0200 Subject: [PATCH] fix(connect): reboot to bootloader (cherry picked from commit 1e29218437f84bed2c4c7ee92087abcf24ad8d40) --- packages/connect/src/core/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/connect/src/core/index.ts b/packages/connect/src/core/index.ts index f3177ba0807..5009581cf38 100644 --- a/packages/connect/src/core/index.ts +++ b/packages/connect/src/core/index.ts @@ -649,7 +649,12 @@ export const onCall = async (message: CoreMessage) => { await resolveAfter(1000).promise; // call Device.run with empty function to fetch new Features // (acquire > Initialize > nothing > release) - await device.run(() => Promise.resolve(), { skipFinalReload: true }); + try { + await device.run(() => Promise.resolve(), { skipFinalReload: true }); + } catch (err) { + // ignore. on model T, this block of code is probably not needed at all. but I am keeping it here for + // backwards compatibility + } } await device.cleanup();