Skip to content

Commit

Permalink
feat(version): release 0.25.1 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Dec 20, 2023
1 parent f6ba4e2 commit e0f3c43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.25.0",
"version": "0.25.1",
"private": true,
"scripts": {
"dev": "react-scripts start",
Expand Down
17 changes: 12 additions & 5 deletions src/contexts/RobotContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,26 @@ export default ({ children }: any) => {
: null;

vdiClient?.addEventListener("open", () => {
isVDIConnected === null && setIsVDIConnected(true);
if (isVDIConnected === null) {
setIsVDIConnected(true);
vdiClient?.close();
}
});

vdiClient?.addEventListener("error", () => {
isVDIConnected === null && setIsVDIConnected(false);
if (isVDIConnected === null) {
setIsVDIConnected(false);
vdiClient?.close();
}
});

vdiClient?.addEventListener("close", () => {
isVDIConnected === null && setIsVDIConnected(false);
if (isVDIConnected === null) {
setIsVDIConnected(false);
vdiClient?.close();
}
});

typeof isVDIConnected === "boolean" && vdiClient?.close();

return () => {
vdiClient?.close();
};
Expand Down

0 comments on commit e0f3c43

Please sign in to comment.