Fixed Exception when requesting exit
This commit is contained in:
parent
5db254e0f1
commit
ac41113853
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user