Removed local concurrency limiters, switch to global rate limiting
This commit is contained in:
@@ -122,7 +122,7 @@ pub fn spawn_mock_imap_server(max_concurrency: u64) -> watch::Sender<bool> {
|
||||
//println!("--- Accepted connection --- ");
|
||||
let acceptor = acceptor.clone();
|
||||
let in_flight = limited.is_allowed();
|
||||
tokio::spawn(accept_imap(stream, acceptor, in_flight));
|
||||
tokio::spawn(accept_imap(stream, acceptor, in_flight.into()));
|
||||
}
|
||||
Err(err) => {
|
||||
panic!("Something went wrong: {err}" );
|
||||
|
||||
@@ -228,7 +228,7 @@ pub fn spawn_mock_lmtp_server(max_concurrency: u64) -> watch::Sender<bool> {
|
||||
Ok((stream, _)) => {
|
||||
let acceptor = acceptor.clone();
|
||||
let in_flight = limited.is_allowed();
|
||||
tokio::spawn(accept_smtp(stream, rx.clone(), acceptor, in_flight));
|
||||
tokio::spawn(accept_smtp(stream, rx.clone(), acceptor, in_flight.into()));
|
||||
}
|
||||
Err(err) => {
|
||||
panic!("Something went wrong: {err}" );
|
||||
|
||||
Reference in New Issue
Block a user