From 8b3bf760450008e16ca400a48f28c75fb283fc8e Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Wed, 27 Sep 2023 10:01:53 -0400 Subject: [PATCH] deps: upgrade tungstenite (#1067) --- Cargo.toml | 2 +- src/filters/ws.rs | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 002de45d2..e7533895d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ tokio-stream = "0.1.1" tokio-util = { version = "0.7", features = ["io"] } tracing = { version = "0.1.21", default-features = false, features = ["log", "std"] } tower-service = "0.3" -tokio-tungstenite = { version = "0.18", optional = true } +tokio-tungstenite = { version = "0.20", optional = true } percent-encoding = "2.1" pin-project = "1.0" tokio-rustls = { version = "0.24", optional = true } diff --git a/src/filters/ws.rs b/src/filters/ws.rs index e5ae62c43..81a6273cb 100644 --- a/src/filters/ws.rs +++ b/src/filters/ws.rs @@ -92,11 +92,21 @@ impl Ws { // config - /// Set the size of the internal message send queue. - pub fn max_send_queue(mut self, max: usize) -> Self { + /// Does nothing. + /// + /// # Deprecated + /// + /// Use `max_write_buffer_size()` instead. + #[deprecated = "use max_write_buffer_size instead"] + pub fn max_send_queue(self, _max: usize) -> Self { + self + } + + /// The max size of the write buffer, in bytes. + pub fn max_write_buffer_size(mut self, max: usize) -> Self { self.config .get_or_insert_with(WebSocketConfig::default) - .max_send_queue = Some(max); + .max_write_buffer_size = max; self }