mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
don't send info packet if downgraded
This commit is contained in:
parent
8bc68dbd71
commit
8cbab94955
2 changed files with 14 additions and 11 deletions
|
@ -763,17 +763,20 @@ impl ClientMux {
|
||||||
let (supported_extensions, extra_packet, downgraded) =
|
let (supported_extensions, extra_packet, downgraded) =
|
||||||
if let Some(builders) = extension_builders {
|
if let Some(builders) = extension_builders {
|
||||||
let x = maybe_wisp_v2(&mut read, &write, builders).await?;
|
let x = maybe_wisp_v2(&mut read, &write, builders).await?;
|
||||||
write
|
// if not downgraded
|
||||||
.write_frame(
|
if !x.2 {
|
||||||
Packet::new_info(
|
write
|
||||||
builders
|
.write_frame(
|
||||||
.iter()
|
Packet::new_info(
|
||||||
.map(|x| x.build_to_extension(Role::Client))
|
builders
|
||||||
.collect(),
|
.iter()
|
||||||
|
.map(|x| x.build_to_extension(Role::Client))
|
||||||
|
.collect(),
|
||||||
|
)
|
||||||
|
.into(),
|
||||||
)
|
)
|
||||||
.into(),
|
.await?;
|
||||||
)
|
}
|
||||||
.await?;
|
|
||||||
x
|
x
|
||||||
} else {
|
} else {
|
||||||
(Vec::new(), None, true)
|
(Vec::new(), None, true)
|
||||||
|
|
|
@ -215,7 +215,7 @@ impl MuxStreamWrite {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Turn the write half into one that implements futures `Sink`, consuming it.
|
/// Turn the write half into one that implements futures `Sink`, consuming it.
|
||||||
pub fn into_sink(self) -> MuxStreamIoSink {
|
pub fn into_sink(self) -> MuxStreamIoSink {
|
||||||
MuxStreamIoSink {
|
MuxStreamIoSink {
|
||||||
tx: self.into_inner_sink(),
|
tx: self.into_inner_sink(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue