Skip to content

Commit 66fa923

Browse files
authored
Merge pull request #6168 from dhalbert/ReloadException-in-repl
fix ReloadException when in REPL
2 parents ff0b3a9 + bf1329b commit 66fa923

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

supervisor/shared/reload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ inline bool autoreload_is_enabled() {
8080
}
8181

8282
void autoreload_trigger() {
83-
if (autoreload_enabled) {
83+
if (autoreload_enabled & !autoreload_suspended) {
8484
last_autoreload_trigger = supervisor_ticks_ms32();
8585
// Guard against the rare time that ticks is 0;
8686
if (last_autoreload_trigger == 0) {

supervisor/shared/usb/usb_msc_flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ void tud_msc_write10_complete_cb(uint8_t lun) {
216216
(void)lun;
217217

218218
// This write is complete; initiate an autoreload.
219-
autoreload_trigger();
220219
autoreload_resume(AUTORELOAD_SUSPEND_USB);
220+
autoreload_trigger();
221221
}
222222

223223
// Invoked when received SCSI_CMD_INQUIRY

0 commit comments

Comments
 (0)