Skip to content

Allow Windows shutdown and sign-out to continue (#58) - #70

Open
elgegeto wants to merge 1 commit into
NikolayIT:masterfrom
elgegeto:fix/issue-58-windows-session-shutdown
Open

elgegeto wants to merge 1 commit into
NikolayIT:masterfrom
elgegeto:fix/issue-58-windows-session-shutdown

Conversation

@elgegeto

Copy link
Copy Markdown

Fixes #58.

Windows shutdown/sign-out was cancelled because the ShutdownRequested handler always set e.Cancel = true. Windows interprets that as a request to abort ending the session.

On Windows, this change now:

  • Saves the session and application settings immediately.
  • Allows Avalonia to complete the OS shutdown request without cancelling it.
  • Bypasses close-to-tray handling while the system is ending the session.

Normal user-initiated exits retain the existing graceful torrent-stop flow (up to five seconds). macOS Quit behavior is unchanged.

Verification: Source review completed. The .NET SDK isn't available in my current environment, so I haven't run the build or tested a live Windows sign-out. Please approve the GitHub Actions workflow if GitHub requests approval, and manually verify Windows sign-out and shutdown, including with close-to-tray enabled.

There are no additional dependencies or unrelated changes.

…T#58)

Save session state synchronously during OS shutdown, bypass close-to-tray, and leave the existing graceful tracker shutdown for ordinary exit requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shutting down or signing out of Windows is cancelled while RatioMaster runs

1 participant