diff --git a/README.md b/README.md
index 8f14bc65..f5fc93ae 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
-
+
diff --git a/package.json b/package.json
index cb56000f..5dc0d148 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "ui",
- "version": "0.24.5",
+ "version": "0.24.6",
"private": true,
"scripts": {
"dev": "react-scripts start",
diff --git a/src/contexts/RobotContext.tsx b/src/contexts/RobotContext.tsx
index 27d03c95..e5be2bf6 100644
--- a/src/contexts/RobotContext.tsx
+++ b/src/contexts/RobotContext.tsx
@@ -263,11 +263,15 @@ export default ({ children }: any) => {
: null;
vdiClient?.addEventListener("open", () => {
- setIsVDIConnected(true);
+ isVDIConnected === null && setIsVDIConnected(true);
});
vdiClient?.addEventListener("error", () => {
- setIsVDIConnected(false);
+ isVDIConnected === null && setIsVDIConnected(false);
+ });
+
+ vdiClient?.addEventListener("close", () => {
+ isVDIConnected === null && setIsVDIConnected(false);
});
typeof isVDIConnected === "boolean" && vdiClient?.close();