summaryrefslogtreecommitdiff
path: root/backend/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/main.py')
-rw-r--r--backend/main.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/backend/main.py b/backend/main.py
index 7af513b3..7e3cdd2a 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -12,7 +12,7 @@ from traceback import format_exc
import aiohttp_cors
# Partial imports
-from aiohttp import ClientSession, client_exceptions
+from aiohttp import ClientSession, client_exceptions, WSMsgType
from aiohttp.web import Application, Response, get, run_app, static
from aiohttp_jinja2 import setup as jinja_setup
@@ -140,8 +140,9 @@ class PluginManager:
if msg.get("method", None) == "Page.domContentEventFired":
if not await tab.has_global_var("deckyHasLoaded", False):
await self.inject_javascript(tab)
- if msg.get("method", None) == "Inspector.detached":
- logger.info("Steam is exiting...")
+ if msg.get("method", None) == "Inspector.detached" or msg.get("type", None) in (WSMsgType.CLOSED, WSMsgType.ERROR):
+ logger.info("CEF has disconnected...")
+ logger.debug("Exit message: " + str(msg))
await tab.close_websocket()
break
except Exception as e: