Fixed Exception when requesting exit

This commit is contained in:
krjan02 2025-01-13 22:34:43 +01:00
parent 5db254e0f1
commit ac41113853

View File

@ -76,12 +76,19 @@ namespace SoraV2Utils_Agent
public void Exit() public void Exit()
{ {
var client = new Client("SoraV2UtilsDeviceData"); // Stop the Service
var service = client.GetServiceProxy<IMouseData>(); try
service.Exit(); {
var client = new Client("SoraV2UtilsDeviceData");
var service = client.GetServiceProxy<IMouseData>();
service.Exit();
}
catch (TimeoutException)
{
}
// Exit the application gracefully // Exit the application
Environment.Exit(0); System.Environment.Exit(1);
} }
} }
} }