ports: Call gc_sweep_all() when doing a soft reset.
This calls finalisers of things like files and sockets to cleanly close them.
This commit is contained in:
@@ -88,6 +88,7 @@ STATIC void mp_reset(void) {
|
||||
}
|
||||
|
||||
void soft_reset(void) {
|
||||
gc_sweep_all();
|
||||
mp_hal_stdout_tx_str("PYB: soft reboot\r\n");
|
||||
mp_hal_delay_us(10000); // allow UART to flush output
|
||||
mp_reset();
|
||||
|
||||
Reference in New Issue
Block a user