Repository navigation
fix(console): stop the dashboard before the shutdown message is drawn - #375
Merged
Merged
Conversation
Since #366 the console shows a branded "Rebooting..." or "Shutting down..." message as soon as a shutdown is chosen. The dashboard is a separate supervised process writing to the same console on its own refresh tick, and nothing told it to stop, so a tick landing after the message was written could redraw the ordinary status frame over it. Wait now stops the console dashboard, and waits for it to have actually exited, before announcing the shutdown message, so no dashboard frame can land after it. Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Bugs5382
marked this pull request as ready for review
October 14, 2026 15:08
Contributor
Author
|
Approved. The dashboard stops before the shutdown message is drawn. Refs #370 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Since #366 the console shows a branded "Rebooting..." or "Shutting down..."
message as soon as a shutdown is chosen. The dashboard is a separate
supervised process (
cmd/cryptos-console) writing to the same/dev/consoleon its own refresh tick, and nothing told it to stop, so a tick landing after
the message was written could redraw the ordinary status frame over it (or
mix the two) until the screen went dark.
shutdownRequests.Waitnow stops the console dashboard, and waits for it tohave actually exited, before announcing the shutdown message, so no dashboard
frame can land after it.
run.gowires this by giving the console supervisorits own cancelable context instead of sharing the node's: canceling it kills
the running
cryptos-consolechild and stops the supervisor from relaunchingit, and
stopConsoleblocks until that has happened.No docs change: the README already describes the branded screen as the
intended behavior; this fixes a race that could violate it, not the described
behavior itself.
Refs #370
Verification
How this was verified
(stopConsole undefined, then wrong call order) and passes with it, asserting stopConsole runs
before announce.