Files
lneto/internal
Pat Whittingslow 97b625de47 fix(xnet): allow installing a retransmission timer on TCP connections (rebased) (#199)
* fix(xnet): install a retransmission timer on TCP connections

No connection created through x/xnet had one. Neither NewTCPPool nor the
dial path in StackGo set ConnConfig.LossRecovery and ConnConfig.Nanotime,
so tcp.Handler ran with loss recovery disabled: nothing noticed a lost
segment, and the connection simply stopped: the sender waiting for an
ACK that cannot arrive, the receiver for data nobody will resend.

TCPPoolConfig.NanoTime already documents itself as "passed to each
tcp.Conn for retransmission timing (RFC 6298)", including the
time.Now fallback when it is nil; this makes that true. Each connection
gets its own tcp.RTO, which shadows that connection's send sequence space
and so cannot be shared. That is 80 bytes per connection, allocated once
at pool construction, against buffers measured in kilobytes.

The test drops exactly one data segment and requires the byte to arrive
anyway. It depends on the FIN-WAIT-1 retransmission fix, since the server
closes after writing.

* merge main fixes

* claude: fix up test to use ltesto.Sched and enable ltesto.Sched multigoro

* move test and simplify top comment

---------

Co-authored-by: Derek den Haas <i.pestano@easyflor.nl>
2026-09-08 01:02:12 -07:00
..
2025-08-20 19:25:08 -03:00
2025-08-20 19:25:08 -03:00
2026-08-28 21:39:12 -03:00
2026-02-27 12:38:33 -03:00