From 43ca641939604d3d6e75b0de451eaa65c9aa31b2 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 31 Mar 2019 12:15:49 +0200 Subject: [PATCH] Flasher: Avoid race condition when flasher finds the not yet closed pm3 port --- client/flash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/flash.c b/client/flash.c index c60dfcbf1..7a8b86d20 100644 --- a/client/flash.c +++ b/client/flash.c @@ -318,6 +318,8 @@ static int enter_bootloader(char *serial_port_name) { } msleep(100); CloseProxmark(); + // Let time to OS to make the port disappear + msleep(1000); bool opened = OpenProxmark(serial_port_name, true, 60, true); if (opened) {