File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
281
281
result .exception_line = 0 ;
282
282
283
283
bool skip_repl ;
284
+ bool skip_wait = false;
284
285
bool found_main = false;
285
286
uint8_t next_code_options = 0 ;
286
287
// Collects stickiness bits that apply in the current situation.
@@ -355,18 +356,23 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
355
356
next_code_stickiness_situation |= SUPERVISOR_NEXT_CODE_OPT_STICKY_ON_SUCCESS ;
356
357
if (next_code_options & SUPERVISOR_NEXT_CODE_OPT_RELOAD_ON_SUCCESS ) {
357
358
skip_repl = true;
359
+ skip_wait = true;
358
360
//goto done;
359
361
}
360
362
}
361
363
else {
362
364
next_code_stickiness_situation |= SUPERVISOR_NEXT_CODE_OPT_STICKY_ON_ERROR ;
363
365
if (next_code_options & SUPERVISOR_NEXT_CODE_OPT_RELOAD_ON_ERROR ) {
366
+ // TODO: in what scenario is this acceptable
364
367
skip_repl = true;
368
+ skip_wait = true;
365
369
//goto done;
366
370
}
367
371
}
368
372
if (result .return_code & PYEXEC_FORCED_EXIT ) {
373
+ // TODO: what scenario does this describe?
369
374
skip_repl = reload_requested ;
375
+ skip_wait = true;
370
376
//goto done;
371
377
}
372
378
@@ -416,7 +422,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) {
416
422
bool fake_sleeping = false;
417
423
#endif
418
424
// bool skip_repl = false;
419
- while (true ) {
425
+ while (! skip_wait ) {
420
426
RUN_BACKGROUND_TASKS ;
421
427
422
428
// If a reload was requested by the supervisor or autoreload, return
You can’t perform that action at this time.
0 commit comments