From 21c0200bd77c8c2933cd4109410a3667e10ff87e Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 2 Oct 2021 14:04:32 +0200 Subject: [PATCH] Fix ESP32 restart hang when USE_EMERGENCY_RESET is enabled --- tasmota/settings.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasmota/settings.ino b/tasmota/settings.ino index bd3312cac..575621071 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -303,6 +303,11 @@ void EmergencyReset(void) { } } while (Serial.available()) { Serial.read(); } // Flush input buffer +#ifdef ESP32 + delay(10); // Allow time to cleanup queues - if not used hangs ESP32 + Serial.end(); + delay(10); // Allow time to cleanup queues - if not used hangs ESP32 +#endif // ESP32 } #endif // USE_EMERGENCY_RESET