diff options
author | Jake McGinty <me@jake.su> | 2018-05-17 19:43:29 -0700 |
---|---|---|
committer | Jake McGinty <me@jake.su> | 2018-05-17 19:44:58 -0700 |
commit | c8a8b6a568e2bb78bdd1470e0fba1fb360b769ee (patch) | |
tree | ecf545d13f9147e671e22890f5d4ce0ede7e2204 /src/ratelimiter.rs | |
parent | global: don't directly rely on tokio 'meta' crate (diff) | |
download | wireguard-rs-c8a8b6a568e2bb78bdd1470e0fba1fb360b769ee.tar.xz wireguard-rs-c8a8b6a568e2bb78bdd1470e0fba1fb360b769ee.zip |
peer_server: use unbounded channels, ratelimiter wip
unbounded channels are easier to deal with now, and bounded
channels weren't actually doing anything useful.
Diffstat (limited to 'src/ratelimiter.rs')
-rw-r--r-- | src/ratelimiter.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ratelimiter.rs b/src/ratelimiter.rs index ee916fc..bdc5c7c 100644 --- a/src/ratelimiter.rs +++ b/src/ratelimiter.rs @@ -24,7 +24,7 @@ struct Entry { pub tokens : u64, } -struct RateLimiter { +pub struct RateLimiter { table : HashMap<IpAddr, Entry>, rx : mpsc::Receiver<()>, } |