diff options
Diffstat (limited to 'app/ui/runview.py')
| -rw-r--r-- | app/ui/runview.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/ui/runview.py b/app/ui/runview.py index 60c43b0..7151ecb 100644 --- a/app/ui/runview.py +++ b/app/ui/runview.py @@ -338,7 +338,7 @@ class RunView: return False if key in (27, ord("q"), 3) and not self.cancelling: if self._prompt_cancel(): - return + return False finally: self._monitor_stop.set() self._cancel.set() @@ -380,12 +380,14 @@ class RunView: return False self.cancelling = True self._cancel.set() + # Wind the worker down BEFORE offering the server stop: killing the + # server under a still-running request turns the cancellation into + # request failures (reported as "failed" instead of "cancelled"). + self._worker.join(timeout=60) # When this run booted the server, offer to shut it down too (the - # boot path kills it itself when cancelled before ready). + # boot path kills it itself when cancelled before ready); by now + # the worker is done, so nothing is mid-request. self._confirm_stop_server() - # Wait for the worker to wind down so the hub menu shows the real - # backend state (and the summary screen is drawn at least once). - self._worker.join(timeout=60) self._drain() self.render() # One more key press acknowledges the final screen. |
