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

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

View file

@ -4,8 +4,10 @@
use bytes::{Buf, Bytes};
use core::task::ready;
use h3::quic::{self, Error, StreamId, WriteBuf};
use s2n_quic::stream::{BidirectionalStream, ReceiveStream};
use s2n_quic_core::varint::VarInt;
use s2n_quic::{
application,
stream::{BidirectionalStream, ReceiveStream},
};
use std::{
convert::TryInto,
fmt::{self, Display},
@ -179,7 +181,7 @@ where
self.conn.close(
code.value()
.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) {
let _ = self
.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"))]