From 33c6d4accc7d3defd81f87dcaf515968a109a4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kiss=20R=C3=B3bert?= Date: Sat, 22 Feb 2025 17:54:11 +0100 Subject: [PATCH] feat: keep reconnecting forever upon kboot firmware update --- packages/uhk-usb/src/uhk-operations.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/uhk-usb/src/uhk-operations.ts b/packages/uhk-usb/src/uhk-operations.ts index 0f0a126f45e..fe0a8ca8639 100644 --- a/packages/uhk-usb/src/uhk-operations.ts +++ b/packages/uhk-usb/src/uhk-operations.ts @@ -413,9 +413,7 @@ export class UhkOperations { } public async waitForKbootIdle(moduleName: string): Promise { - const timeoutTime = new Date(new Date().getTime() + 30000); - - while (new Date() < timeoutTime) { + while (true) { const buffer = await this.device.write(Buffer.from([UsbCommand.GetProperty, DevicePropertyIds.CurrentKbootCommand])); this.device.close(); @@ -427,8 +425,6 @@ export class UhkOperations { await snooze(1000); } - - return false; } public async getModuleProperty({ module, property } : GetModulePropertyArguments): Promise {