Ack dropping - fix for #50 (#127)

* fix for #50

* fix remaining test

* revert changes and instead approach problem on full-duplex case

* fix merge messup

* fix @MDr164 note and upgrade documentation while at it

* gate full buffer exit on rx shutdown since no risk of full buffer error

* add log line to note issue is hit

* document CloseRead relationship with Close
This commit is contained in:
Pat Whittingslow
2026-06-19 18:43:13 -03:00
committed by GitHub
parent 6f5acd1948
commit 8f9d765cb0
4 changed files with 192 additions and 7 deletions
+9
View File
@@ -146,6 +146,15 @@ func (tcb *ControlBlock) MakeKeepalive() Segment {
}
}
// QueueRST queues a RST segment to be emitted on the next send, overriding any
// other pending flags. seq is the sequence number the RST will carry (per RFC
// 9293 reset generation, the acknowledged value SEG.ACK of the offending
// segment). The connection should be torn down once the RST is sent.
func (tcb *ControlBlock) QueueRST(seq Value) {
tcb.pending = [2]Flags{0: FlagRST}
tcb.rstPtr = seq
}
// MakeDupACK returns a duplicate ACK segment suitable for fast-retransmit
// recovery signaling, without advancing the sender ACK boundary. Useful for:
// - constructing an explicit duplicate ACK from local state (e.g. test harness),