Merge pull request #784 from robhoes/master

CA-192640: Don't log exceptions when HealthCheck service is not insta…
This commit is contained in:
Mihaela Stoica 2016-01-20 14:52:29 +00:00
commit 77a255c2ad

View File

@ -1,4 +1,4 @@
/* Copyright (c) Citrix Systems Inc.
/* Copyright (c) Citrix Systems Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
@ -71,8 +71,15 @@ namespace XenAdmin.Actions
protected override void Run()
{
ServiceController sc = new ServiceController(HEALTHCHECKSERVICENAME);
if (sc.Status != ServiceControllerStatus.Running)
try
{
if (sc.Status != ServiceControllerStatus.Running)
return;
}
catch
{
return;
}
NamedPipeClientStream pipeClient = new NamedPipeClientStream(".", HealthCheckSettings.HEALTH_CHECK_PIPE, PipeDirection.Out);
int retryCount = 120;