Upgrade tokio-tungstenite

This commit is contained in:
Marcin Kulik
2024-10-20 10:19:18 +02:00
parent c18815704c
commit 44b28794c0
3 changed files with 17 additions and 49 deletions

62
Cargo.lock generated
View File

@@ -137,7 +137,7 @@ dependencies = [
"termion",
"tokio",
"tokio-stream",
"tokio-tungstenite 0.21.0",
"tokio-tungstenite",
"tokio-util",
"tower-http",
"tracing",
@@ -214,7 +214,7 @@ dependencies = [
"sha1",
"sync_wrapper 1.0.1",
"tokio",
"tokio-tungstenite 0.24.0",
"tokio-tungstenite",
"tower 0.5.1",
"tower-layer",
"tower-service",
@@ -1697,12 +1697,11 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.22.4"
version = "0.23.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b"
dependencies = [
"log",
"ring",
"once_cell",
"rustls-pki-types",
"rustls-webpki 0.102.2",
"subtle",
@@ -2260,11 +2259,11 @@ dependencies = [
[[package]]
name = "tokio-rustls"
version = "0.25.0"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
dependencies = [
"rustls 0.22.4",
"rustls 0.23.7",
"rustls-pki-types",
"tokio",
]
@@ -2281,22 +2280,6 @@ dependencies = [
"tokio-util",
]
[[package]]
name = "tokio-tungstenite"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38"
dependencies = [
"futures-util",
"log",
"rustls 0.22.4",
"rustls-pki-types",
"tokio",
"tokio-rustls 0.25.0",
"tungstenite 0.21.0",
"webpki-roots",
]
[[package]]
name = "tokio-tungstenite"
version = "0.24.0"
@@ -2305,8 +2288,12 @@ checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"
dependencies = [
"futures-util",
"log",
"rustls 0.23.7",
"rustls-pki-types",
"tokio",
"tungstenite 0.24.0",
"tokio-rustls 0.26.0",
"tungstenite",
"webpki-roots",
]
[[package]]
@@ -2485,27 +2472,6 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "tungstenite"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1"
dependencies = [
"byteorder",
"bytes",
"data-encoding",
"http 1.0.0",
"httparse",
"log",
"rand",
"rustls 0.22.4",
"rustls-pki-types",
"sha1",
"thiserror",
"url",
"utf-8",
]
[[package]]
name = "tungstenite"
version = "0.24.0"
@@ -2519,6 +2485,8 @@ dependencies = [
"httparse",
"log",
"rand",
"rustls 0.23.7",
"rustls-pki-types",
"sha1",
"thiserror",
"utf-8",

View File

@@ -40,7 +40,7 @@ tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
rgb = "0.8.37"
url = "2.5.0"
tokio-tungstenite = { version = "0.21.0", features = ["rustls-tls-webpki-roots"] }
tokio-tungstenite = { version = "0.24.0", features = ["rustls-tls-webpki-roots"] }
sha2 = "0.10.8"
tokio-util = "0.7.10"
chrono = "0.4.38"

View File

@@ -94,7 +94,7 @@ async fn connect_and_forward(
url: &url::Url,
clients_tx: &mpsc::Sender<session::Client>,
) -> anyhow::Result<bool> {
let (ws, _) = tokio_tungstenite::connect_async_with_config(url, None, true).await?;
let (ws, _) = tokio_tungstenite::connect_async_with_config(url.to_string(), None, true).await?;
info!("connected to the endpoint");
let events = event_stream(clients_tx).await?;