From 1a8e60858ef736c95e9cfc1f99a2031772fa0dbd Mon Sep 17 00:00:00 2001 From: chandi Date: Wed, 12 Apr 2023 20:14:25 +0200 Subject: [PATCH] use tryReboot() wrapper for all reboots reboots sometimes lead to errors being thrown due to the usb device gone missing. the tryReoot() wrapper got introduced for that case but was not used everywhere. --- src/factory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/factory.ts b/src/factory.ts index 5899b36..e8218d6 100644 --- a/src/factory.ts +++ b/src/factory.ts @@ -284,7 +284,7 @@ export async function flashZip( "reboot", "device", FASTBOOTD_REBOOT_TIME, - device.reboot("fastboot", true, onReconnect) + tryReboot(device, "fastboot", onReconnect) ); let superName = await device.getVariable("super-partition-name"); @@ -322,7 +322,7 @@ export async function flashZip( "reboot", "device", BOOTLOADER_REBOOT_TIME, - device.reboot("bootloader", true, onReconnect) + tryReboot(device, "bootloader", onReconnect) ); }