From 2e6a46ca10159fa310cc922ac13db906de53245c Mon Sep 17 00:00:00 2001 From: Ralph Ursprung Date: Wed, 9 Jul 2025 15:02:04 +0200 Subject: [PATCH] re-attempt soft reboot if it failed note that this does not fix #92, but it might help in other cases where soft reboot failed. hard reboot on the other hand always kills the program if it fails, so this hasn't been modified. --- teensy_loader_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teensy_loader_cli.c b/teensy_loader_cli.c index 523f2af..7c985db 100644 --- a/teensy_loader_cli.c +++ b/teensy_loader_cli.c @@ -131,8 +131,8 @@ int main(int argc, char **argv) if (soft_reboot_device) { if (soft_reboot()) { printf_verbose("Soft reboot performed\n"); + soft_reboot_device = 0; } - soft_reboot_device = 0; wait_for_device_to_appear = 1; } if (!wait_for_device_to_appear) die("Unable to open device (hint: try -w option)\n");