Skip to content

Commit

Permalink
deps: upgrade tungstenite (#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Sep 27, 2023
1 parent 5ad8a9c commit 8b3bf76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
16 changes: 13 additions & 3 deletions src/filters/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 8b3bf76

Please sign in to comment.