diff --git a/esptool/loader.py b/esptool/loader.py index 9b5dfe05f..fabb5d82d 100644 --- a/esptool/loader.py +++ b/esptool/loader.py @@ -737,7 +737,7 @@ def connect( " if ESP32-C2 doesn't connect" " (at least 115200 Bd is recommended)." ) - + self._port.close() raise FatalError( "Failed to connect to {}: {}" f"{additional_msg}"