diff --git a/src/sched.c b/src/sched.c index 7e4a86a1..6ccf8e5a 100644 --- a/src/sched.c +++ b/src/sched.c @@ -276,7 +276,8 @@ void sched_shutdown(unsigned int reason) { irq_disable(); - shutdown_reason = reason; + if (!shutdown_status) + shutdown_reason = reason; longjmp(shutdown_jmp, 1); }