Upgrade tokio-tungstenite to 0.26 (#3078)

This commit is contained in:
Lena
2024-12-18 15:15:55 -05:00
committed by GitHub
parent 5cdd8a4f18
commit 96e071c8fb
9 changed files with 194 additions and 58 deletions
+2 -2
View File
@@ -75,7 +75,7 @@ async fn ws_handler(
res = ws.recv() => {
match res {
Some(Ok(ws::Message::Text(s))) => {
let _ = sender.send(s);
let _ = sender.send(s.to_string());
}
Some(Ok(_)) => {}
Some(Err(e)) => tracing::debug!("client disconnected abruptly: {e}"),
@@ -85,7 +85,7 @@ async fn ws_handler(
// Tokio guarantees that `broadcast::Receiver::recv` is cancel-safe.
res = receiver.recv() => {
match res {
Ok(msg) => if let Err(e) = ws.send(ws::Message::Text(msg)).await {
Ok(msg) => if let Err(e) = ws.send(ws::Message::Text(msg.into())).await {
tracing::debug!("client disconnected abruptly: {e}");
}
Err(_) => continue,