From 2a837a3d4108d7b7b0d0f995bdc6a0875ae61879 Mon Sep 17 00:00:00 2001 From: ResuBaka Date: Mon, 21 Jul 2025 21:14:34 +0200 Subject: [PATCH 1/2] Update tungstenite to get client read performance improvement They did a small change around the way the handle the read buffer resize which bring a perf improvement for bigger messages and smaller ones. --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9a46c5794db..88eebf8bdc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6900,9 +6900,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.26.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" +checksum = "489a59b6730eda1b0171fcfda8b121f4bee2b35cba8645ca35c5f7ba3eb736c1" dependencies = [ "futures-util", "log", @@ -7170,9 +7170,9 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.26.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" +checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" dependencies = [ "bytes", "data-encoding", diff --git a/Cargo.toml b/Cargo.toml index aa50ce9f825..2bddfdc2989 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -265,7 +265,7 @@ tokio = { version = "1.37", features = ["full"] } tokio_metrics = { version = "0.4.0" } tokio-postgres = { version = "0.7.8", features = ["with-chrono-0_4"] } tokio-stream = "0.1.17" -tokio-tungstenite = { version = "0.26.2", features = ["native-tls"] } +tokio-tungstenite = { version = "0.27.0", features = ["native-tls"] } tokio-util = { version = "0.7.4", features = ["time"] } toml = "0.8" toml_edit = "0.22.22" From e7fcf7ed8561640e28c269120dc5b516fd353b9f Mon Sep 17 00:00:00 2001 From: ResuBaka Date: Tue, 22 Jul 2025 18:54:36 +0200 Subject: [PATCH 2/2] fix: use new WeError::Utf8 syntax --- crates/client-api/src/routes/subscribe.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/client-api/src/routes/subscribe.rs b/crates/client-api/src/routes/subscribe.rs index b1e94e1ea9a..2e718528afd 100644 --- a/crates/client-api/src/routes/subscribe.rs +++ b/crates/client-api/src/routes/subscribe.rs @@ -772,7 +772,7 @@ fn ws_recv_loop( | WsError::Capacity(_) | WsError::Protocol(_) | WsError::WriteBufferFull(_) - | WsError::Utf8 + | WsError::Utf8(_) | WsError::AttackAttempt | WsError::Url(_) | WsError::Http(_)