1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-19 14:08:11 +00:00

fix(core/bootloader): fix retries when reading from USB

This commit is contained in:
tychovrahe 2023-03-21 09:43:35 +01:00 committed by TychoVrahe
parent 4d0381055c
commit 3f54b84aef
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
Fixed retries counter when reading from USB

View File

@ -198,6 +198,7 @@ static void _usb_webusb_read_retry(uint8_t iface_num, uint8_t *buf) {
if (r != USB_PACKET_SIZE) { // reading failed
if (r == 0 && retry < 10) {
// only timeout => let's try again
continue;
} else {
// error
error_shutdown("USB ERROR",