Removed local concurrency limiters, switch to global rate limiting

This commit is contained in:
mdecimus
2025-01-18 19:09:02 +01:00
parent e7c6be45d8
commit 8438435fbe
54 changed files with 439 additions and 11477 deletions

View File

@@ -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}" );

View File

@@ -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}" );