attempt to fix #22 (#23)

This commit is contained in:
Pat Whittingslow
2026-01-19 23:22:54 -03:00
committed by GitHub
parent 9d83707557
commit e13bb45854
4 changed files with 133 additions and 10 deletions
+4
View File
@@ -194,6 +194,10 @@ func (h *Handler) Recv(incomingPacket []byte) error {
return err
}
}
if segIncoming.Flags.HasAny(FlagACK) {
// Update TX ring buffer to free up acked data.
h.bufTx.RecvACK(segIncoming.ACK)
}
if segIncoming.Flags.HasAny(FlagSYN) && h.remotePort == 0 {
// Remote reached out and has given us their port, set it on our side.
h.debug("tcp.Handler:rx-remoteport-set", slog.Uint64("port", uint64(h.localPort)), slog.Uint64("remoteport", uint64(remotePort)))