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:
2026-10-13 16:00:10 -05:00
co-authored by Claude Opus 4.8
parent b4ff9a10a2
commit 2a3e88c8dc
+2
View File
@@ -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();