fix(network): do not re-pin a lite server while a connect is in progress
Pinning a lite server while a connection to it was already being established tore the in-flight connect down and restarted it, slowing the very connection the user was waiting on. - Pinning is now skipped while a connect is already underway, so the existing attempt is left to finish. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,8 @@ void RenderLiteNetworkTab(App* app)
|
||||
// retries the pinned one.
|
||||
auto* lite = app->liteWallet();
|
||||
if (!randomMode && url == sticky && lite && lite->walletOpen() && lite->connectedServerUrl() == url) return;
|
||||
// A connect is already underway: re-pinning would tear it down and restart it.
|
||||
if (lite && lite->openInProgress()) return;
|
||||
st->setLiteServerSelectionMode(LiteMode::Sticky);
|
||||
st->setLiteStickyServerUrl(url);
|
||||
applyAndRebuild();
|
||||
|
||||
Reference in New Issue
Block a user