Fix crash after some while

This commit is contained in:
Sijmen 2023-11-23 11:45:55 +01:00
parent 603f4c96e2
commit 7fd71c8f07
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -34,16 +34,17 @@ pub async fn message_loop(
loop {
select! {
val = irc_stream.next() => {
if let Some(message) = val.transpose()? {
if let Some(Ok(message)) = val {
println!("[Rx] {}", message.to_string().trim());
message_tx.send(message)?;
}
}
val = input_rx.recv() => {
let message = val.unwrap();
if let Some(message) = val {
println!("[Tx] {}", message.to_string().trim());
client.send(message)?;
}
}
}
}
}