mirror of
https://github.com/soypat/lneto.git
synced 2026-09-08 15:59:10 +00:00
97b625de47
* 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>