Skip to content

Commit 203c3f4

Browse files
authored
Merge pull request #3282 from JdeRobot/connect-always-working
Fix connect callback
2 parents 324f081 + e284a88 commit 203c3f4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

react_frontend/src/components/buttons/PlayPause.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ const PlayPauseButton = ({
8282
if (manager.getState() === states.IDLE) {
8383
info("Connecting with the Robotics Backend ...");
8484
connectManager(states.TOOLS_READY, () => {
85-
onAppStateChange();
85+
setLoading(false);
8686
close();
87+
onAppStateChange();
8788
});
8889
return;
8990
}

react_frontend/src/components/layouts/ExerciseContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const ExerciseContainer = ({
168168
}
169169
} catch (e: unknown) {
170170
console.log("Connection failed, trying again!");
171-
setTimeout(connectWithRetry, 2000);
171+
setTimeout(connectWithRetry, 2000, desiredState, callback);
172172
}
173173
};
174174

0 commit comments

Comments
 (0)