chore: follow the up-to-date s2n-quic-h3

This commit is contained in:
Jun Kurihara 2024-11-01 15:22:45 +09:00
commit 7aefc011c0
No known key found for this signature in database
GPG key ID: 9C5AF0A526862FEF
3 changed files with 9 additions and 9 deletions

View file

@ -93,14 +93,14 @@ tracing = { version = "0.1.40" }
quinn = { version = "0.11.5", optional = true } quinn = { version = "0.11.5", optional = true }
h3 = { version = "0.0.6", features = ["tracing"], optional = true } h3 = { version = "0.0.6", features = ["tracing"], optional = true }
h3-quinn = { version = "0.0.7", optional = true } h3-quinn = { version = "0.0.7", optional = true }
s2n-quic-h3 = { path = "../submodules/s2n-quic-h3/", features = [
"tracing",
], optional = true }
s2n-quic = { version = "1.48.0", default-features = false, features = [ s2n-quic = { version = "1.48.0", default-features = false, features = [
"provider-tls-rustls", "provider-tls-rustls",
], optional = true } ], optional = true }
s2n-quic-core = { version = "0.48.0", default-features = false, optional = true } s2n-quic-core = { version = "0.48.0", default-features = false, optional = true }
s2n-quic-rustls = { version = "0.48.0", optional = true } s2n-quic-rustls = { version = "0.48.0", optional = true }
s2n-quic-h3 = { path = "../submodules/s2n-quic-h3/", features = [
"tracing",
], optional = true }
########## ##########
# for UDP socket wit SO_REUSEADDR when h3 with quinn # for UDP socket wit SO_REUSEADDR when h3 with quinn
socket2 = { version = "0.5.7", features = ["all"], optional = true } socket2 = { version = "0.5.7", features = ["all"], optional = true }

View file

@ -14,9 +14,7 @@ bytes = { version = "1", default-features = false }
futures = { version = "0.3", default-features = false } futures = { version = "0.3", default-features = false }
h3 = { version = "0.0.6", features = ["tracing"] } h3 = { version = "0.0.6", features = ["tracing"] }
# s2n-quic = { path = "../s2n-quic" } # s2n-quic = { path = "../s2n-quic" }
# s2n-quic-core = { path = "../s2n-quic-core" }
s2n-quic = { version = "1.47.0" } s2n-quic = { version = "1.47.0" }
s2n-quic-core = { version = "0.48.0" }
tracing = { version = "0.1.40", optional = true } tracing = { version = "0.1.40", optional = true }
[features] [features]

View file

@ -4,8 +4,10 @@
use bytes::{Buf, Bytes}; use bytes::{Buf, Bytes};
use core::task::ready; use core::task::ready;
use h3::quic::{self, Error, StreamId, WriteBuf}; use h3::quic::{self, Error, StreamId, WriteBuf};
use s2n_quic::stream::{BidirectionalStream, ReceiveStream}; use s2n_quic::{
use s2n_quic_core::varint::VarInt; application,
stream::{BidirectionalStream, ReceiveStream},
};
use std::{ use std::{
convert::TryInto, convert::TryInto,
fmt::{self, Display}, fmt::{self, Display},
@ -179,7 +181,7 @@ where
self.conn.close( self.conn.close(
code.value() code.value()
.try_into() .try_into()
.unwrap_or_else(|_| VarInt::MAX.into()), .unwrap_or(application::Error::UNKNOWN),
); );
} }
} }
@ -462,7 +464,7 @@ where
fn reset(&mut self, reset_code: u64) { fn reset(&mut self, reset_code: u64) {
let _ = self let _ = self
.stream .stream
.reset(reset_code.try_into().unwrap_or_else(|_| VarInt::MAX.into())); .reset(reset_code.try_into().unwrap_or(application::Error::UNKNOWN));
} }
#[cfg_attr(feature = "tracing", instrument(skip_all, level = "trace"))] #[cfg_attr(feature = "tracing", instrument(skip_all, level = "trace"))]