Skip to content

Commit

Permalink
Remove QueuePriority stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
pthatcher committed Nov 8, 2023
1 parent 2b04b6c commit 8d23067
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/packet/pacer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,18 +436,11 @@ impl LeakyBucketPacer {
return Some((queued_at, Some(qs)));
}

// "Media queue" as opposed to a "padding queue".
let non_empty_queue = {
let non_empty_queues = self.queue_states.iter().filter(|q| {
let is_none_empty_queue = match q.snapshot.priority {
QueuePriority::Media => true,
// TODO: Try changing this to false. Currently, if it's false, the test_realistic test fails.
QueuePriority::Padding => true,
// TODO: Try removing "q.snapshot.packet_count > 0" and using "QueuePriority::Empty => false" instead
QueuePriority::Empty => true,
};
q.snapshot.packet_count > 0 && is_none_empty_queue
});
let non_empty_queues = self
.queue_states
.iter()
.filter(|q| q.snapshot.packet_count > 0);

// Send on the non-empty queue with the lowest priority that, was least recently
// sent on.
Expand Down

0 comments on commit 8d23067

Please sign in to comment.