tcp: bugfix for challenge ack panic edge case (#48)

This commit is contained in:
Pat Whittingslow
2026-02-28 20:18:39 +01:00
committed by GitHub
parent fa5ba918bb
commit bd76ebe5ed
2 changed files with 102 additions and 1 deletions
+1 -1
View File
@@ -276,7 +276,7 @@ func (h *Handler) Send(b []byte) (int, error) {
// No pending control segment or data to send. Yield.
return 0, nil
}
if available > 0 {
if segment.DATALEN > 0 {
n, err := h.bufTx.MakePacket(b[sizeHeaderTCP:sizeHeaderTCP+segment.DATALEN], segment.SEQ)
if err != nil {
return 0, err