Fix crash after some while
This commit is contained in:
parent
603f4c96e2
commit
7fd71c8f07
1 changed files with 5 additions and 4 deletions
|
@ -34,15 +34,16 @@ 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();
|
||||
println!("[Tx] {}", message.to_string().trim());
|
||||
client.send(message)?;
|
||||
if let Some(message) = val {
|
||||
println!("[Tx] {}", message.to_string().trim());
|
||||
client.send(message)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue