CA-180128: Ignoring more exceptions on the connection thread when disruption is expected

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2015-10-20 10:28:51 +01:00
parent f36c30362f
commit 53e1153801

View File

@ -1278,9 +1278,17 @@ namespace XenAdmin.Network
XenObjectDownloader.GetEvents(eventNextSession, eventQueue, task.GetCancelled, legacyEventSystem, ref token); XenObjectDownloader.GetEvents(eventNextSession, eventQueue, task.GetCancelled, legacyEventSystem, ref token);
eventsExceptionLogged = false; eventsExceptionLogged = false;
} }
catch (WebException exn) catch (Exception exn)
{ {
if (ExpectDisruption && (exn.Status == WebExceptionStatus.KeepAliveFailure || exn.Status == WebExceptionStatus.ConnectFailure)) if (!ExpectDisruption)
throw;
log.DebugFormat("Exception (disruption is expected) in XenObjectDownloader.GetEvents: {0}", exn.GetType().Name);
// ignoring some exceptions when disruption is expected
if (exn is XmlRpcIllFormedXmlException ||
exn is System.IO.IOException ||
(exn is WebException && ((exn as WebException).Status == WebExceptionStatus.KeepAliveFailure || (exn as WebException).Status == WebExceptionStatus.ConnectFailure)))
{ {
if (!eventsExceptionLogged) if (!eventsExceptionLogged)
{ {