Follow-up from PR #136 review.
Problem
Only the transient side starts the WS heartbeat after attach (tree/manager.go:585, cmd/repram/main.go:306). On the substrate side, bindWSConnection accepts the connection and dispatches gossip but never calls conn.StartHeartbeat().
Consequence: half-open child sockets are only detected when the transient's heartbeat dies. The substrate has no proactive liveness check on its inbound side and will hold dead child entries (in children map + ACK route table memory) until the transient eventually notices and reconnects, or until the OS gives up on the TCP flow.
Fix
In cmd/repram/main.go:bindWSConnection, after a successful HandleHello, call conn.StartHeartbeat() so the substrate also pings and tears down on missed pongs.
Acceptance
// ticktockbent
Follow-up from PR #136 review.
Problem
Only the transient side starts the WS heartbeat after attach (
tree/manager.go:585,cmd/repram/main.go:306). On the substrate side,bindWSConnectionaccepts the connection and dispatches gossip but never callsconn.StartHeartbeat().Consequence: half-open child sockets are only detected when the transient's heartbeat dies. The substrate has no proactive liveness check on its inbound side and will hold dead child entries (in
childrenmap + ACK route table memory) until the transient eventually notices and reconnects, or until the OS gives up on the TCP flow.Fix
In
cmd/repram/main.go:bindWSConnection, after a successfulHandleHello, callconn.StartHeartbeat()so the substrate also pings and tears down on missed pongs.Acceptance
cmd/repram/ws_integration_test.go// ticktockbent