We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 805caf4 commit 8bf1638Copy full SHA for 8bf1638
common/src/typed_socket/server.rs
@@ -30,7 +30,10 @@ pub async fn handle_messages<T: ChannelMessage>(
30
SocketAction::Send(msg) => {
31
let msg = Message::Text(serde_json::to_string(&msg).expect("Always serializable."));
32
if let Err(err) = socket.send(msg.clone()).await {
33
- tracing::error!(?err, message=?msg, "Failed to send message on websocket.");
+ tracing::warn!(?err, ?msg, "Failed to send message on websocket.");
34
+ // If the connection is already closed, the error is unrecoverable,
35
+ // and we should stop trying to send messages.
36
+ break;
37
}
38
39
SocketAction::Close => {
0 commit comments