mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic: Config: add fields for max handler request, channel timeout
This commit is contained in:
parent
e61c961126
commit
5430e561f5
3 changed files with 24 additions and 5 deletions
|
|
@ -26,10 +26,12 @@ pub fn handle(
|
|||
let mut std_rng = StdRng::from_entropy();
|
||||
let mut small_rng = SmallRng::from_rng(&mut std_rng).unwrap();
|
||||
|
||||
let timeout = Duration::from_millis(10);
|
||||
let timeout = Duration::from_millis(
|
||||
config.handlers.channel_recv_timeout_ms
|
||||
);
|
||||
|
||||
loop {
|
||||
for i in 0..1000 {
|
||||
for i in 0..config.handlers.max_requests_per_iter {
|
||||
let (request, src): (Request, SocketAddr) = if i == 0 {
|
||||
match request_receiver.recv(){
|
||||
Ok(r) => r,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue