mbproxy: add keepalive / connection monitoring
The DL205/DL260 ECOM emits no TCP keepalives, so an idle backend socket can be silently dropped by a middlebox (switch, firewall, NAT) after 2-5 minutes. Enable OS SO_KEEPALIVE on backend and accepted upstream sockets, and drive a periodic synthetic FC03 heartbeat on each idle backend socket so a dead path is detected before a real client request hits it. Controlled by Connection.Keepalive (ON by default). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,13 @@ public sealed record PlcBackendStatus(
|
||||
long CacheMissCount,
|
||||
long CacheInvalidations,
|
||||
long CacheEntryCount,
|
||||
long CacheBytes);
|
||||
long CacheBytes,
|
||||
/// <summary>Backend keepalive heartbeat probes issued on idle backend sockets.</summary>
|
||||
long BackendHeartbeatsSent,
|
||||
/// <summary>Keepalive heartbeat probes that timed out (backend not answering).</summary>
|
||||
long BackendHeartbeatsFailed,
|
||||
/// <summary>Backend teardowns triggered by a failed keepalive heartbeat.</summary>
|
||||
long BackendIdleDisconnects);
|
||||
|
||||
/// <summary>Modbus exception counts by code.</summary>
|
||||
public sealed record ExceptionCounts(
|
||||
|
||||
Reference in New Issue
Block a user