chore: prioritize http3-quinn over http3-s2n when both features are enabled (avoid compile error)

This commit is contained in:
Jun Kurihara 2023-12-09 00:17:59 +09:00
commit f7142828ac
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
6 changed files with 14 additions and 17 deletions

View file

@ -27,9 +27,6 @@ pub mod reexports {
pub use rustls::{Certificate, PrivateKey};
}
#[cfg(all(feature = "http3-quinn", feature = "http3-s2n"))]
compile_error!("feature \"http3-quinn\" and feature \"http3-s2n\" cannot be enabled at the same time");
/// Entrypoint that creates and spawns tasks of reverse proxy services
pub async fn entrypoint<T>(
proxy_config: &ProxyConfig,
@ -40,6 +37,9 @@ pub async fn entrypoint<T>(
where
T: CryptoSource + Clone + Send + Sync + 'static,
{
#[cfg(all(feature = "http3-quinn", feature = "http3-s2n"))]
warn!("Both \"http3-quinn\" and \"http3-s2n\" features are enabled. \"http3-quinn\" will be used");
// For initial message logging
if proxy_config.listen_sockets.iter().any(|addr| addr.is_ipv6()) {
info!("Listen both IPv4 and IPv6")