Add max concurrent requests to startup info

Display the configured max_concurrent_requests value in the server
startup information, consistent with other configuration values like
log level, host, port, etc.
This commit is contained in:
Jeena 2026-01-16 02:42:18 +00:00
parent 0468781a69
commit 1500057a92

View file

@ -12,12 +12,13 @@ use tokio::net::TcpListener;
use tokio_rustls::TlsAcceptor;
use logging::init_logging;
fn print_startup_info(host: &str, port: u16, root: &str, cert: &str, key: &str, log_level: Option<&str>) {
fn print_startup_info(host: &str, port: u16, root: &str, cert: &str, key: &str, log_level: Option<&str>, max_concurrent: usize) {
println!("Pollux Gemini Server");
println!("Listening on: {}:{}", host, port);
println!("Serving: {}", root);
println!("Certificate: {}", cert);
println!("Key: {}", key);
println!("Max concurrent requests: {}", max_concurrent);
if let Some(level) = log_level {
println!("Log level: {}", level);
}
@ -111,7 +112,7 @@ async fn main() {
let listener = TcpListener::bind(format!("{}:{}", host, port)).await.unwrap();
// Print startup information
print_startup_info(&host, port, &root, &cert_path, &key_path, Some(log_level));
print_startup_info(&host, port, &root, &cert_path, &key_path, Some(log_level), max_concurrent_requests);
loop {
let (stream, _) = listener.accept().await.unwrap();