wip: h3-0.0.8
This commit is contained in:
parent
67e78041b4
commit
9e743b0dca
4 changed files with 36 additions and 14 deletions
24
Cargo.lock
generated
24
Cargo.lock
generated
|
|
@ -1000,6 +1000,20 @@ name = "h3"
|
|||
version = "0.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7dfb059a4f28a66f186ed16ad912d142f490676acba59353831d7cb45a96b0d3"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"fastrand",
|
||||
"futures-util",
|
||||
"http",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "h3"
|
||||
version = "0.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10872b55cfb02a821b69dc7cf8dc6a71d6af25eb9a79662bec4a9d016056b3be"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"fastrand",
|
||||
|
|
@ -1012,13 +1026,13 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "h3-quinn"
|
||||
version = "0.0.9"
|
||||
version = "0.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d482318ae94198fc8e3cbb0b7ba3099c865d744e6ec7c62039ca7b6b6c66fbf"
|
||||
checksum = "8b2e732c8d91a74731663ac8479ab505042fbf547b9a207213ab7fbcbfc4f8b4"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"futures",
|
||||
"h3",
|
||||
"h3 0.0.8",
|
||||
"quinn",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
|
|
@ -2159,7 +2173,7 @@ dependencies = [
|
|||
"futures",
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
"h3",
|
||||
"h3 0.0.8",
|
||||
"h3-quinn",
|
||||
"hot_reload",
|
||||
"http",
|
||||
|
|
@ -2443,7 +2457,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"bytes",
|
||||
"futures",
|
||||
"h3",
|
||||
"h3 0.0.7",
|
||||
"s2n-quic",
|
||||
"tracing",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ tracing = { version = "0.1.41" }
|
|||
|
||||
# http/3
|
||||
quinn = { version = "0.11.7", optional = true }
|
||||
h3 = { version = "0.0.7", features = ["tracing"], optional = true }
|
||||
h3-quinn = { version = "0.0.9", optional = true }
|
||||
h3 = { version = "0.0.8", features = ["tracing"], optional = true }
|
||||
h3-quinn = { version = "0.0.10", optional = true }
|
||||
s2n-quic = { version = "1.57.0", path = "../submodules/s2n-quic/quic/s2n-quic/", default-features = false, features = [
|
||||
"provider-tls-rustls",
|
||||
], optional = true }
|
||||
|
|
|
|||
|
|
@ -37,8 +37,11 @@ pub enum RpxyError {
|
|||
|
||||
// http/3 errors
|
||||
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
|
||||
#[error("H3 error: {0}")]
|
||||
H3Error(#[from] h3::Error),
|
||||
#[error("h3 connection error: {0}")]
|
||||
H3ConnectionError(#[from] h3::error::ConnectionError),
|
||||
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
|
||||
#[error("h3 connection error: {0}")]
|
||||
H3StreamError(#[from] h3::error::StreamError),
|
||||
// #[cfg(feature = "http3-s2n")]
|
||||
// #[error("H3 error: {0}")]
|
||||
// H3Error(#[from] s2n_quic_h3::h3::Error),
|
||||
|
|
|
|||
|
|
@ -49,12 +49,17 @@ where
|
|||
}
|
||||
Err(e) => {
|
||||
warn!("HTTP/3 error on accept incoming connection: {}", e);
|
||||
match e.get_error_level() {
|
||||
h3::error::ErrorLevel::ConnectionError => break,
|
||||
h3::error::ErrorLevel::StreamError => continue,
|
||||
}
|
||||
break;
|
||||
}
|
||||
Ok(Some((req, stream))) => {
|
||||
// Ok(Some((req, stream))) => {
|
||||
Ok(Some(req_resolver)) => {
|
||||
let (req, stream) = match req_resolver.resolve_request().await {
|
||||
Ok((req, stream)) => (req, stream),
|
||||
Err(e) => {
|
||||
warn!("HTTP/3 error on resolve request in stream: {}", e);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
// We consider the connection count separately from the stream count.
|
||||
// Max clients for h1/h2 = max 'stream' for h3.
|
||||
let request_count = self.globals.request_count.clone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue