Skip to content

Commit

Permalink
Remove unnecessary unwrap in error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
SpamapS committed May 31, 2024
1 parent 878f143 commit b57f3ca
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions rustygear/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,17 @@ impl Client {
handler.call(frame)
}
};
if let Err(e) = response {
error!("conn dropped?: {}", e);
break;
}
if let Err(_) = tx.send(response.unwrap()).await
{
error!("receiver dropped")
match response {
Err(e) => {
error!("conn dropped?: {}", e);
break;
}
Ok(response) => {
if let Err(_) = tx.send(response).await
{
error!("receiver dropped")
}
}
}
}
reader_conns
Expand Down

0 comments on commit b57f3ca

Please sign in to comment.