mirror of
https://github.com/smittix/intercept.git
synced 2026-07-19 06:48:11 -07:00
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:
@@ -96,7 +96,11 @@ const MeshCore = (function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _pollUntilConnected(attempts) {
|
function _pollUntilConnected(attempts) {
|
||||||
if (_connected || attempts > 15) return;
|
if (_connected) return;
|
||||||
|
if (attempts > 15) {
|
||||||
|
_updateStatusUI('error', 'Connection timed out');
|
||||||
|
return;
|
||||||
|
}
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await _checkStatus();
|
await _checkStatus();
|
||||||
if (!_connected) _pollUntilConnected(attempts + 1);
|
if (!_connected) _pollUntilConnected(attempts + 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user