deps(phoenix-channel): upgrade tokio-tungstenite (#2230)

Resolves: #2200.
This commit is contained in:
Thomas Eizinger
2023-10-04 10:59:12 +11:00
committed by GitHub
parent 2c00e1da3e
commit a02abcbac5
3 changed files with 14 additions and 44 deletions

51
rust/Cargo.lock generated
View File

@@ -1189,7 +1189,7 @@ dependencies = [
"serde_json",
"time",
"tokio",
"tokio-tungstenite 0.20.1",
"tokio-tungstenite",
"tokio-util",
"tracing",
"tracing-android",
@@ -1215,7 +1215,7 @@ dependencies = [
"serde",
"serde_json",
"tokio",
"tokio-tungstenite 0.20.1",
"tokio-tungstenite",
"tracing",
"url",
"webrtc",
@@ -1902,7 +1902,7 @@ dependencies = [
"thiserror",
"tokio",
"tokio-stream",
"tokio-tungstenite 0.20.1",
"tokio-tungstenite",
"tracing",
"tracing-android",
"tracing-appender",
@@ -2454,7 +2454,7 @@ dependencies = [
"serde_json",
"thiserror",
"tokio",
"tokio-tungstenite 0.19.0",
"tokio-tungstenite",
"tracing",
"url",
]
@@ -2985,7 +2985,7 @@ dependencies = [
"log",
"ring 0.16.20",
"sct 0.6.1",
"webpki 0.21.4",
"webpki",
]
[[package]]
@@ -3680,21 +3680,6 @@ dependencies = [
"tokio",
]
[[package]]
name = "tokio-tungstenite"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c"
dependencies = [
"futures-util",
"log",
"rustls 0.21.7",
"rustls-native-certs",
"tokio",
"tokio-rustls",
"tungstenite 0.19.0",
]
[[package]]
name = "tokio-tungstenite"
version = "0.20.1"
@@ -3704,9 +3689,10 @@ dependencies = [
"futures-util",
"log",
"rustls 0.21.7",
"rustls-native-certs",
"tokio",
"tokio-rustls",
"tungstenite 0.20.1",
"tungstenite",
"webpki-roots",
]
@@ -3980,27 +3966,6 @@ version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
[[package]]
name = "tungstenite"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67"
dependencies = [
"byteorder",
"bytes",
"data-encoding",
"http",
"httparse",
"log",
"rand",
"rustls 0.21.7",
"sha1 0.10.6",
"thiserror",
"url",
"utf-8",
"webpki 0.22.2",
]
[[package]]
name = "tungstenite"
version = "0.20.1"
@@ -4401,7 +4366,7 @@ dependencies = [
"subtle",
"thiserror",
"tokio",
"webpki 0.21.4",
"webpki",
"webrtc-util",
"x25519-dalek",
"x509-parser 0.13.2",

View File

@@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
secrecy = { workspace = true }
tokio-tungstenite = { version = "0.19", features = ["rustls-tls-native-roots"] }
tokio-tungstenite = { version = "0.20.1", features = ["rustls-tls-native-roots"] }
futures = "0.3.28"
base64 = "0.21.4"
serde = { version = "1.0.188", features = ["derive"] }

View File

@@ -232,6 +232,11 @@ where
return Poll::Ready(Ok(Event::HeartbeatSent));
}
// Priority 4: Flush out.
if self.stream.poll_flush_unpin(cx)?.is_ready() {
tracing::trace!("Flushed websocket")
}
return Poll::Pending;
}
}