Skip to content

Commit 563564a

Browse files
committed
refactor(proto): Rename maybe_queue_probe to queue_tail_loss_probe
1 parent c2103a1 commit 563564a

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

noq-proto/src/connection/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ impl Connection {
15351535
// We need something to send for a tail-loss probe.
15361536
let request_immediate_ack =
15371537
space_id == SpaceId::Data && self.peer_supports_ack_frequency();
1538-
self.spaces[space_id].maybe_queue_probe(
1538+
self.spaces[space_id].queue_tail_loss_probe(
15391539
path_id,
15401540
request_immediate_ack,
15411541
&self.streams,

noq-proto/src/connection/spaces.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ impl PacketSpace {
8585

8686
/// Queue data for a tail loss probe (or anti-amplification deadlock prevention) packet
8787
///
88-
/// Does nothing if no tail loss probe needs to be sent.
89-
///
9088
/// Probes are sent similarly to normal packets when an expected ACK has not arrived. We never
9189
/// deem a packet lost until we receive an ACK that should have included it, but if a trailing
9290
/// run of packets (or their ACKs) are lost, this might not happen in a timely fashion. We send
@@ -97,16 +95,12 @@ impl PacketSpace {
9795
/// waiting to be sent, then we retransmit in-flight data to reduce odds of loss. If there's no
9896
/// in-flight data either, we're probably a client guarding against a handshake
9997
/// anti-amplification deadlock and we just make something up.
100-
pub(super) fn maybe_queue_probe(
98+
pub(super) fn queue_tail_loss_probe(
10199
&mut self,
102100
path_id: PathId,
103101
request_immediate_ack: bool,
104102
streams: &StreamsState,
105103
) {
106-
if self.for_path(path_id).loss_probes == 0 {
107-
return;
108-
}
109-
110104
if request_immediate_ack {
111105
// The probe should be ACKed without delay (should only be used in the Data space and
112106
// when the peer supports the acknowledgement frequency extension)

0 commit comments

Comments
 (0)