Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/waltz/quic/fd_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4473,6 +4473,16 @@ fd_quic_pkt_meta_retry( fd_quic_t * quic,
/* do not try sending data that has been acked */
ulong offset = fd_ulong_max( pkt_meta->val.range.offset_lo, stream->unacked_low );

/* This pkt_meta may be stale: when ACK-driven loss detection
force-retries an earlier pkt_meta for the same stream, the
retransmitted data can be ACKed (advancing unacked_low)
before this pkt_meta expires. Skip the retry if the
stream has nothing left to send. */
if( FD_UNLIKELY( offset>=stream->tx_buf.head &&
!( stream->state & FD_QUIC_STREAM_STATE_TX_FIN ) ) ) {
break;
}

/* any data left to retry? */
stream->tx_sent = fd_ulong_min( stream->tx_sent, offset );

Expand Down
2 changes: 2 additions & 0 deletions src/waltz/quic/tests/Local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ $(call make-unit-test,test_quic_svc_q,test_quic_svc_q,$(QUIC_TEST_LIBS))
$(call make-unit-test,test_quic_pkt_meta,test_quic_pkt_meta,$(QUIC_TEST_LIBS))
$(call make-unit-test,test_quic_keep_alive,test_quic_keep_alive,$(QUIC_TEST_LIBS))
$(call make-unit-test,test_quic_retx,test_quic_retx,$(QUIC_TEST_LIBS))
$(call make-unit-test,test_quic_pkt_meta_lifecycle,test_quic_pkt_meta_lifecycle,$(QUIC_TEST_LIBS))
$(call run-unit-test,test_quic_proto)
$(call run-unit-test,test_quic_hs)
$(call run-unit-test,test_quic_streams)
Expand All @@ -32,6 +33,7 @@ $(call run-unit-test,test_quic_concurrency)
$(call run-unit-test,test_quic_svc_q)
$(call run-unit-test,test_quic_pkt_meta)
$(call run-unit-test,test_quic_keep_alive)
$(call run-unit-test,test_quic_pkt_meta_lifecycle)

# fd_quic_tls unit tests
$(call make-unit-test,test_quic_tls_hs,test_quic_tls_hs,$(QUIC_TEST_LIBS))
Expand Down
Loading
Loading