diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index de43a6b..08f306d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -203,6 +203,9 @@ async fn serve_h3(state: Arc<State>) -> Result<()> { Some(n) => n, None => return Ok(()), }; + if https_config.disable_h3 { + return Ok(()); + } let bind_addrs = https_config.bind.clone(); let certs = CertPool::load(&https_config.cert_path, https_config.cert_fallback.clone())?; let mut cfg = rustls::ServerConfig::builder() @@ -216,7 +219,7 @@ async fn serve_h3(state: Arc<State>) -> Result<()> { let cfg = quinn::ServerConfig::with_crypto(cfg.clone()); let endpoint = quinn::Endpoint::server(cfg, *listen_addr)?; let listen_addr = *listen_addr; - info!("HTTPS (HTTP/3) listener bound to {listen_addr}"); + info!("HTTPS (h3) listener bound to {listen_addr}"); while let Some(conn) = endpoint.accept().await { let state = state.clone(); tokio::spawn(async move { @@ -288,13 +291,10 @@ async fn serve_h3(state: Arc<State>) -> Result<()> { } } Ok(None) => break, - Err(e) => { - warn!("h3 error: {e}"); - match e.get_error_level() { - ErrorLevel::ConnectionError => break, - ErrorLevel::StreamError => continue, - } - } + Err(e) => match e.get_error_level() { + ErrorLevel::ConnectionError => break, + ErrorLevel::StreamError => continue, + }, } } drop(_sem); |