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;
|
||||
|
||||
Reference in New Issue
Block a user