Fixed Exception when requesting exit
This commit is contained in:
parent
5db254e0f1
commit
ac41113853
@ -76,12 +76,19 @@ namespace SoraV2Utils_Agent
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
var client = new Client("SoraV2UtilsDeviceData");
|
||||
var service = client.GetServiceProxy<IMouseData>();
|
||||
service.Exit();
|
||||
// Stop the Service
|
||||
try
|
||||
{
|
||||
var client = new Client("SoraV2UtilsDeviceData");
|
||||
var service = client.GetServiceProxy<IMouseData>();
|
||||
service.Exit();
|
||||
}
|
||||
catch (TimeoutException)
|
||||
{
|
||||
}
|
||||
|
||||
// Exit the application gracefully
|
||||
Environment.Exit(0);
|
||||
// Exit the application
|
||||
System.Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user