CompletedAsyncResult<bool>.End(completedResult);
}
- using (LockHelper.TakeReaderLock(this.readerWriterLock))
+ bool isClosed = !closed;
+ try
{
- try
+ return ValidateUriRouteAsyncResult.End(result);
+ }
+ catch (Exception exception)
+ {
+ if (Fx.IsFatal(exception) || !isClosed)
{
- return ValidateUriRouteAsyncResult.End(result);
+ throw;
}
- catch (Exception exception)
- {
- if (Fx.IsFatal(exception) || !closed)
- {
- throw;
- }
- DiagnosticUtility.TraceHandledException(exception, TraceEventType.Error);
- return false;
- }
+ DiagnosticUtility.TraceHandledException(exception, TraceEventType.Error);
+ return false;
}
}