diff options
| author | TrainDoctor <traindoctor@protonmail.com> | 2022-11-13 17:36:00 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-13 17:36:00 -0800 |
| commit | c9ee98e0c0cc91634f0273407962e8f265060ba8 (patch) | |
| tree | 489d5dd4ca4a943e1818060fbd56f1cc411870e2 /backend | |
| parent | 093b064a4ee1876e0253258c6321513af375e591 (diff) | |
| download | decky-loader-c9ee98e0c0cc91634f0273407962e8f265060ba8.tar.gz decky-loader-c9ee98e0c0cc91634f0273407962e8f265060ba8.zip | |
Fix desktop mode loop (#253)v2.4.1-pre1
* fix desktop mode making injector get stuck
* Fix imports and variable references
* Get data for all messages
Co-authored-by: AAGaming <aa@mail.catvibers.me>
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/injector.py | 2 | ||||
| -rw-r--r-- | backend/main.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/backend/injector.py b/backend/injector.py index 82ed6ed4..5112efe1 100644 --- a/backend/injector.py +++ b/backend/injector.py @@ -5,7 +5,7 @@ from logging import getLogger from traceback import format_exc from typing import List -from aiohttp import ClientSession +from aiohttp import ClientSession, WSMsgType from aiohttp.client_exceptions import ClientConnectorError from asyncio.exceptions import TimeoutError import uuid 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: |
