fix(historian-gateway): dispose alarm-write channel at shutdown + ServerHistorian startup diagnostic

Claude-Session: https://claude.ai/code/session_012SDSQ3AcaXqPcBtDESBRii
This commit is contained in:
Joseph Doherty
2026-06-26 17:55:44 -04:00
parent 22711444cc
commit 035bde0562
4 changed files with 28 additions and 2 deletions
@@ -732,12 +732,13 @@ public sealed class SqliteStoreAndForwardSink : IAlarmHistorianSink, IDisposable
/// <summary>Gets the current exponential backoff delay for retry operations.</summary>
public TimeSpan CurrentBackoff => BackoffLadder[_backoffIndex];
/// <summary>Disposes the sink and releases all held resources including the drain timer.</summary>
/// <summary>Disposes the sink and releases all held resources including the drain timer and the writer.</summary>
public void Dispose()
{
if (_disposed) return;
_disposed = true;
_drainTimer?.Dispose();
_drainGate.Dispose();
if (_writer is IDisposable writerDisposable) writerDisposable.Dispose();
}
}