Phase 3 PR 53 -- Transport reconnect-on-drop + SO_KEEPALIVE (DL260 no-keepalive quirk) #52
Reference in New Issue
Block a user
Delete Branch "phase-3-pr53-dl205-reconnect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
DL260's H2-ECOM100 does NOT send TCP keepalives — intermediate NAT/firewall middleboxes silently close idle sockets after 2-5 minutes. Previously the first
SendAsyncafter the drop surfaced asIOException/EndOfStreamExceptionto the caller even though the PLC was fine.Changes in
ModbusTcpTransport:New
ModbusDriverOptions.AutoReconnect(default true). Opt-out preserves old fail-loud semantics for callers that want explicit reconnect control.Validation
ModbusTcpReconnectTestsboots a real in-process TcpListener that forcibly closes after one transaction; asserts auto-retry succeeds AND opt-out path propagates the drop)Test plan