feat: put the account's Full VPN setting back when the VPN goes off; release 0.1.3
ysj7705/mudfish-decky/pipeline/head This commit looks good
ysj7705/mudfish-decky/pipeline/head This commit looks good
The node the plugin sets is account-wide, so the PC's Mudfish would also start in Full VPN. Remember the account's own value before changing it and restore it on every teardown (off, connect failure, resume, unload, uninstall); retry in the background if the restore fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
01c5f3f315
commit
9cf6efb8ad
7 files changed
+57
-7
No files matched your search
@@ -16,6 +16,7 @@ from mudfish_decky.store import Store # noqa: E402
|
||||
|
||||
RESUME_POLL_SECONDS = 2
|
||||
LATEST_POLL_TICKS = 1800 # every hour at 2s per tick
|
||||
RESTORE_RETRY_TICKS = 30 # retry a pending account restore every minute
|
||||
LOGIN_RELAY_SECONDS = 300
|
||||
|
||||
|
||||
@@ -89,6 +90,8 @@ class Plugin:
|
||||
controller.check_resume(system.sleep_offset())
|
||||
if ticks % LATEST_POLL_TICKS == 0:
|
||||
await asyncio.to_thread(controller.refresh_latest)
|
||||
if ticks % RESTORE_RETRY_TICKS == 0:
|
||||
await asyncio.to_thread(controller.retry_restore)
|
||||
except Exception as e:
|
||||
decky.logger.warning("background check failed: %s", e)
|
||||
ticks += 1
|
||||
|
||||
Reference in new issue
Block a user