Skip to content

Commit

Permalink
fix: Improve error handling for response sending in WebSocket backend (
Browse files Browse the repository at this point in the history
  • Loading branch information
S0c5 authored Aug 23, 2024
1 parent 1bbff6b commit a06afe6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sube/src/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ impl Backend {
let mut messages = messages.lock().await;
if let Some(channel) = messages.remove(&id) {
log::debug!("Answered request id: {}", id);
channel.send(res).expect("receiver waiting");
if let Err(res) = channel.send(res) {
log::warn!("response error: {:?}", res);
}
}
}
}
Expand Down

0 comments on commit a06afe6

Please sign in to comment.