Skip to content

Commit

Permalink
don't handle_crash during shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed Sep 1, 2024
1 parent 5e8df19 commit 8657ab5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/decky_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ async def startup(_: Application):
self.web_app.add_routes([static("/static", path.join(path.dirname(__file__), 'static'))])

async def handle_crash(self):
if not self.reinject:
return
new_time = time()
if (new_time - self.last_webhelper_exit < 60):
self.webhelper_crash_count += 1
Expand All @@ -123,8 +125,8 @@ async def shutdown(self, _: Application):
logger.info("Killing plugins...")
await self.plugin_loader.shutdown_plugins()
logger.info("Disconnecting from WS...")
await self.ws.disconnect()
self.reinject = False
await self.ws.disconnect()
if self.js_ctx_tab:
await self.js_ctx_tab.close_websocket()
self.js_ctx_tab = None
Expand Down

0 comments on commit 8657ab5

Please sign in to comment.