fix(daemon): guard start/connect during shutdown
Once a shutdown was under way the app could still launch or restart the full node and keep running the RPC connection state machine. That could spawn a daemon process on the way out and surface a spurious connection failure toast as the window tore down. - Starting the embedded daemon now bails out immediately while a shutdown is in progress, so the node is never (re)launched on exit. - The connect attempt returns early during shutdown, so there is no start/connect try and no stray failure toast on the exit screen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -5769,6 +5769,7 @@ void App::setDaemonStatus(std::string s)
|
||||
|
||||
bool App::startEmbeddedDaemon()
|
||||
{
|
||||
if (shutting_down_) return false; // exit in progress: never (re)launch the node
|
||||
if (!supportsEmbeddedDaemon()) {
|
||||
DEBUG_LOGF("Embedded daemon support unavailable in this build, not starting\n");
|
||||
return false;
|
||||
|
||||
@@ -393,6 +393,7 @@ void App::tryConnect()
|
||||
// Lite builds have no full node / RPC daemon, so never run the RPC connection state machine
|
||||
// (it would just fail every tick). The lite controller drives the wallet; "online" status is
|
||||
// derived from it each frame in App::update(), which also gates the wallet UI (isConnected()).
|
||||
if (shutting_down_) return; // exit screen: no connect/start attempt, no spurious failure toast
|
||||
if (isLiteBuild()) return;
|
||||
|
||||
// Catch a startup wallet salvage as soon as it appears in the node's output — independent of whether
|
||||
|
||||
Reference in New Issue
Block a user