fix: console not connected when fast-lane RPC still connecting
The console tab was passed fast_rpc_ even before its async connection completed, causing 'Not connected to daemon' errors despite the main RPC being connected and sync data flowing. Fall back to the main rpc_/worker_ until fast_rpc_ reports isConnected().
This commit is contained in:
@@ -1108,9 +1108,10 @@ void App::render()
|
|||||||
case ui::NavPage::Console:
|
case ui::NavPage::Console:
|
||||||
// Use fast-lane worker for console commands to avoid head-of-line
|
// Use fast-lane worker for console commands to avoid head-of-line
|
||||||
// blocking behind the consolidated refreshData() batch.
|
// blocking behind the consolidated refreshData() batch.
|
||||||
|
// Fall back to main rpc/worker if fast-lane hasn't connected yet.
|
||||||
console_tab_.render(embedded_daemon_.get(),
|
console_tab_.render(embedded_daemon_.get(),
|
||||||
fast_rpc_ ? fast_rpc_.get() : rpc_.get(),
|
(fast_rpc_ && fast_rpc_->isConnected()) ? fast_rpc_.get() : rpc_.get(),
|
||||||
fast_worker_ ? fast_worker_.get() : worker_.get(),
|
(fast_rpc_ && fast_rpc_->isConnected() && fast_worker_) ? fast_worker_.get() : worker_.get(),
|
||||||
xmrig_manager_.get());
|
xmrig_manager_.get());
|
||||||
break;
|
break;
|
||||||
case ui::NavPage::Settings:
|
case ui::NavPage::Settings:
|
||||||
|
|||||||
Reference in New Issue
Block a user