Skip to content

tor-proto: Fixes/improvements to stream rate limiter

Various fixes and improvements, but the main two are:

  1. The token bucket is now refilled before changing the rate with TokenBucket::adjust.
  2. Fixes a bug in RateLimitedWriter::poll_write where a bucket with a max of 0 can cause the writer to behave incorrectly.

@jnewsome Marking you as a reviewer since it's a follow-up to !3014 (merged).

/cc @dgoulet

Merge request reports

Loading