chore(historian): drop dead pipe package ref + stale pipe strings (review)
This commit is contained in:
+6
-6
@@ -8,12 +8,12 @@ using ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client.Ipc;
|
||||
namespace ZB.MOM.WW.OtOpcUa.Driver.Historian.Wonderware.Client.Internal;
|
||||
|
||||
/// <summary>
|
||||
/// Owns one connection to the Wonderware historian sidecar pipe. Handles the Hello
|
||||
/// Owns one TCP connection to the Wonderware historian sidecar. Handles the Hello
|
||||
/// handshake, serializes outgoing requests + waits for the matching reply frame, and
|
||||
/// reconnects on transport failure with exponential backoff.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Single in-flight call at a time — the sidecar's pipe protocol is request/response
|
||||
/// Single in-flight call at a time — the sidecar's TCP protocol is request/response
|
||||
/// over a single bidirectional stream, so multiple concurrent <see cref="InvokeAsync"/>
|
||||
/// calls would interleave replies. A <see cref="SemaphoreSlim"/> serializes them. PR 6.x
|
||||
/// can layer batching on top.
|
||||
@@ -147,7 +147,7 @@ internal sealed class FrameChannel : IAsyncDisposable
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or EndOfStreamException or ObjectDisposedException)
|
||||
{
|
||||
_logger.LogWarning(ex, "Sidecar pipe transport failure on {Kind}; reconnecting", requestKind);
|
||||
_logger.LogWarning(ex, "Sidecar TCP transport failure on {Kind}; reconnecting", requestKind);
|
||||
ResetTransport();
|
||||
await ConnectInternalAsync(timeout.Token).ConfigureAwait(false);
|
||||
// One retry. If the second attempt also fails, propagate.
|
||||
@@ -162,7 +162,7 @@ internal sealed class FrameChannel : IAsyncDisposable
|
||||
{
|
||||
await _writer!.WriteAsync(requestKind, request, ct).ConfigureAwait(false);
|
||||
var frame = await _reader!.ReadFrameAsync(ct).ConfigureAwait(false)
|
||||
?? throw new EndOfStreamException("Sidecar closed pipe before reply.");
|
||||
?? throw new EndOfStreamException("Sidecar closed connection before reply.");
|
||||
if (frame.Kind != expectedReplyKind)
|
||||
{
|
||||
throw new InvalidDataException(
|
||||
@@ -189,7 +189,7 @@ internal sealed class FrameChannel : IAsyncDisposable
|
||||
await _writer.WriteAsync(MessageKind.Hello, hello, ct).ConfigureAwait(false);
|
||||
|
||||
var ackFrame = await _reader.ReadFrameAsync(ct).ConfigureAwait(false)
|
||||
?? throw new EndOfStreamException("Sidecar closed pipe before HelloAck.");
|
||||
?? throw new EndOfStreamException("Sidecar closed connection before HelloAck.");
|
||||
if (ackFrame.Kind != MessageKind.HelloAck)
|
||||
{
|
||||
ResetTransport();
|
||||
@@ -204,7 +204,7 @@ internal sealed class FrameChannel : IAsyncDisposable
|
||||
$"Sidecar rejected Hello: {ack.RejectReason ?? "<no reason>"}.");
|
||||
}
|
||||
|
||||
_logger.LogInformation("Sidecar pipe connected — host={Host}", ack.HostName);
|
||||
_logger.LogInformation("Sidecar TCP connected — host={Host}", ack.HostName);
|
||||
}
|
||||
|
||||
private void ResetTransport()
|
||||
|
||||
Reference in New Issue
Block a user