mirror of
https://github.com/smittix/intercept.git
synced 2026-06-08 22:21:55 -07:00
Merge pull request #224 from smittix/fix/meshcore-connect-timeout
fix(meshcore): show error when connection times out
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user