Closing a connection when the system sleeps/suspends #1303
Unanswered
charredchar
asked this question in
Q&A
Replies: 1 comment
-
|
There's no built in feature but you can use a third party script to monitor idle state and restart Apollo Service |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am attempting to have my systems properly close the stream connection when I use sleep or suspend on the host.
The issue is doing a sleep/suspend will cause an error in Moonlight:
The primary problem with this is if you run Moonlight via cmd it'll stay open in the background since there is no UI to show the error, the only way to close Moonlight is via Task Manager. Since it stays open it also messes with things like Playnite on the client thinking it's still running so if you launch the stream from Playnite it'll never return to Playnite if it closes this way.
It'll also mean Apollo still thinks the stream is in progress when it wakes from sleep. This one isn't such a big deal but I'd like to stop this as well if I can.
This does not happen when shutting down or rebooting the host as Apollo will close the stream before the host proceeds with shutdown or reboot.
I understand that this is technically a Moonlight issue ... but I'm working with what I got. I have a feeling this wouldn't be fixed if I made a bug report for it over there. 😉
Since we use
Suspend Systemfrom Playnite on the host I'd rather not do something like creating a new "game" that tells the system to close the stream then suspend the system. If I have to explain to others, "No, don't suspend the system from the normal methods, use this instead." it won't ever happen.I also don't want to tie it directly to something like if Playnite exits have the stream closed as well. Or when the stream disconnects have it automatically go to sleep. In either of these instances any oddities (like needing to restart Playnite on the host) will cause an undesired PC state.
What I would prefer is some way to tell Apollo to close all streams when Windows is told to sleep/suspend/hibernate. Even better is if I can use the
--quite-afterflag from the Moonlight connection to have Apollo decide if the app should close along with the stream so it's not reliant on the Application settings within Apollo.I've been tinkering with using Task Scheduler to monitor for sleep events but I haven't had much luck yet. I also don't know what commands I could send to Apollo to close streams if I managed to get that to work.
I may also see if I can manage to override the Playnite
Suspend Systemcommand as that'll likely be used most of the time where this is an actual problem. But I don't think that is possible so I'm open to all other options.Beta Was this translation helpful? Give feedback.
All reactions