Improve gateway reliability and dashboard docs
This commit is contained in:
@@ -79,7 +79,14 @@ public sealed class MxAccessSession : IDisposable
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
eventSink.Detach();
|
||||
try
|
||||
{
|
||||
eventSink.Detach();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Preserve the creation failure while still releasing the COM object below.
|
||||
}
|
||||
|
||||
if (mxAccessComObject is not null && Marshal.IsComObject(mxAccessComObject))
|
||||
{
|
||||
@@ -535,13 +542,15 @@ public sealed class MxAccessSession : IDisposable
|
||||
|
||||
private void DisposeCore(ICollection<MxAccessShutdownFailure>? failures)
|
||||
{
|
||||
Exception? detachException = null;
|
||||
try
|
||||
{
|
||||
eventSink.Detach();
|
||||
}
|
||||
catch (Exception exception) when (failures is not null)
|
||||
catch (Exception exception)
|
||||
{
|
||||
failures.Add(new MxAccessShutdownFailure(
|
||||
detachException = exception;
|
||||
failures?.Add(new MxAccessShutdownFailure(
|
||||
"DetachEvents",
|
||||
serverHandle: null,
|
||||
itemHandle: null,
|
||||
@@ -565,6 +574,10 @@ public sealed class MxAccessSession : IDisposable
|
||||
}
|
||||
|
||||
disposed = true;
|
||||
if (detachException is not null && failures is null)
|
||||
{
|
||||
throw detachException;
|
||||
}
|
||||
}
|
||||
|
||||
private void ThrowIfDisposed()
|
||||
|
||||
Reference in New Issue
Block a user