mirror of
https://github.com/smittix/intercept.git
synced 2026-06-22 03:58:52 -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) {
|
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