gui: add logs when export_subscription() fail to send a message

This commit is contained in:
pythcoiner 2025-03-02 12:19:02 +01:00
parent aa0c5d303a
commit a12bb0b5a4
No known key found for this signature in database
GPG Key ID: C1048AEEDF303B88

View File

@ -364,7 +364,9 @@ pub fn export_subscription(
let msg = state.receiver.try_recv();
let disconnected = match msg {
Ok(m) => {
let _ = output.send(m).await;
if let Err(e) = output.send(m).await {
tracing::error!("export_subscription() fail to send message: {}", e);
}
continue;
}
Err(e) => match e {
@ -376,7 +378,9 @@ pub fn export_subscription(
let handle = match state.handle.take() {
Some(h) => h,
None => {
let _ = output.send(ExportProgress::Error(Error::HandleLost)).await;
if let Err(e) = output.send(ExportProgress::Error(Error::HandleLost)).await {
tracing::error!("export_subscription() fail to send message: {}", e);
}
continue;
}
};
@ -391,7 +395,9 @@ pub fn export_subscription(
}
};
if let Some(msg) = msg {
let _ = output.send(msg).await;
if let Err(e) = output.send(msg).await {
tracing::error!("export_subscription() fail to send message: {}", e);
}
continue;
}
state.handle = Some(handle);