Skip to content

Commit

Permalink
Rename var to error
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Jul 12, 2023
1 parent 2dc146f commit f24f1f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,18 @@ pub async fn run(server: server::Entry, mut sender: mpsc::Sender<Update>) -> Nev
};
}
Err(e) => {
let e = match e {
let error = match e {
// unwrap Tls-specific error enums to access more error info
irc::error::Error::Tls(e) => format!("a TLS error occured: {e}"),
_ => e.to_string(),
};
log::warn!("[{server}] connection failed: {e}");

log::warn!("[{server}] connection failed: {error}");

let _ = sender
.send(Update::ConnectionFailed {
server: server.clone(),
error: e,
error,
})
.await;

Expand Down

0 comments on commit f24f1f7

Please sign in to comment.