Skip to content

Commit eb92cbc

Browse files
author
Neil Tallim
committed
Packets unsent due to the send-buffer being filled should no longer count as lost traffic.
Version tentatively bumped to 0.1.8.
1 parent b5e9d21 commit eb92cbc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rperf"
3-
version = "0.1.7"
3+
version = "0.1.8"
44
description = "validates network throughput capacity and reliability"
55
authors = ["Neil Tallim <neiltallim@3d-p.com>"]
66
edition = "2021"

src/stream/udp.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ pub mod receiver {
303303
self.process_jitter(&source_timestamp, &mut history);
304304

305305
if history.unbroken_sequence > history.longest_unbroken_sequence {
306-
history.longest_unbroken_sequence = history.unbroken_sequence
307-
history.longest_jitter_seconds = history.jitter_seconds
306+
history.longest_unbroken_sequence = history.unbroken_sequence;
307+
history.longest_jitter_seconds = history.jitter_seconds;
308308
}
309309
} else {
310310
history.unbroken_sequence = 0;
@@ -561,6 +561,8 @@ pub mod sender {
561561
Err(e) if e.kind() == std::io::ErrorKind::WouldBlock => { //send-buffer is full
562562
//nothing to do, but avoid burning CPU cycles
563563
sleep(BUFFER_FULL_TIMEOUT);
564+
//roll back the packet-ID because nothing was actually emitted
565+
self.next_packet_id -= 1;
564566
},
565567
Err(e) => {
566568
return Some(Err(Box::new(e)));

0 commit comments

Comments
 (0)