fix(meshcore): show error state when connection times out

After 30s of polling with no response, update UI to 'Connection timed
out' instead of silently leaving the dot stuck on Connecting...

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-05-13 20:39:16 +01:00
parent a59d4ec603
commit c5fdf7f7e9
+5 -1
View File
@@ -96,7 +96,11 @@ const MeshCore = (function () {
}
function _pollUntilConnected(attempts) {
if (_connected || attempts > 15) return;
if (_connected) return;
if (attempts > 15) {
_updateStatusUI('error', 'Connection timed out');
return;
}
setTimeout(async () => {
await _checkStatus();
if (!_connected) _pollUntilConnected(attempts + 1);