Subscribe to sessionEnding and Terminate
MODIFY
WalletWasabi/Services/Terminate/TerminateService.cs
WalletWasabi/Services/Terminate/TerminateService.cs
@@ -31,8 +31,10 @@ namespace WalletWasabi.Services.Terminate
private void Windows_SystemEvents_SessionEnding(object sender, SessionEndingEventArgs e)
{
+ // This event will only be triggered if you run Wasabi from the published package. Use the packager with --onlybinaries option.
+ Logger.LogInfo($"Process termination was requested by the OS, reason {e.Reason}");
e.Cancel = true;
- Logger.LogInfo("Windows_SystemEvents_SessionEnding cancelled");
+ Terminate();
}
private void CurrentDomain_ProcessExit(object? sender, EventArgs e)

Subscribe to sessionEnding and Terminate