Skip to content

Commit

Permalink
fix(connect): reboot to bootloader
Browse files Browse the repository at this point in the history
(cherry picked from commit 1e29218)
  • Loading branch information
mroz22 authored and matejkriz committed Oct 9, 2023
1 parent 0b3ccfe commit 794fabd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/connect/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 794fabd

Please sign in to comment.