Skip to content

Commit

Permalink
"waiting for backend" modal disappears on reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
megascatterbomb committed Mar 21, 2024
1 parent 6812cf6 commit 61e95b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function App() {
try {
const configured = await isBackendConfigured();
if (!configured) throw new Error('Backend not configured');
if (modalContent) closeModal();
closeModal();
return true;
} catch (e) {
console.error('Error verifying backend configuration', e);
Expand All @@ -142,7 +142,7 @@ function App() {
do {
connected = await isBackendConnected();
if (!connected) {
await new Promise((resolve) => setTimeout(resolve, 5000)); // Wait 5 seconds before retrying
await new Promise((resolve) => setTimeout(resolve, 1000)); // Wait 1 second before retrying
}
} while (!connected);
verifyConfigured();
Expand All @@ -162,7 +162,7 @@ function App() {
if (useFakedata) return;

verificationRoutine();
const intervalId = setInterval(verificationRoutine, 5000);
const intervalId = setInterval(verificationRoutine, 1000);

return () => {
clearInterval(intervalId);
Expand Down

0 comments on commit 61e95b2

Please sign in to comment.