Skip to content

Commit 5676efa

Browse files
authored
Dont create a TLP from an existing packet if that packet is already in the process of being transmitted. if pkt->ref_count == 2 then the packet has already been submitted to the uv_udp_queue for transmission (#273)
1 parent 60cf0cf commit 5676efa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/udx.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,14 +958,15 @@ udx_tlp_timeout (uv_timer_t *timer) {
958958

959959
// first try to send a new packet
960960
if (!send_new_packet(stream, UDX_PROBE_TYPE_TLP)) {
961+
961962
udx_packet_t *pkt = (udx_packet_t *) udx__cirbuf_get(&stream->outgoing, stream->seq - 1);
962963

963-
if (!pkt || pkt->lost) {
964+
if (!pkt || pkt->lost || pkt->ref_count == 2) {
964965
schedule_loss_probe(stream);
965966
return;
966967
}
967968

968-
debug_printf("udx: sending tlp from existing packet");
969+
debug_printf("udx: making tlp from existing packet %u\n", pkt->seq);
969970

970971
udx__queue_unlink(&stream->inflight_queue, &pkt->queue); // retransmit will add it back
971972
retransmit_packet(stream, pkt);

0 commit comments

Comments
 (0)