gui: add logs when export_subscription() fail to send a message
This commit is contained in:
parent
aa0c5d303a
commit
a12bb0b5a4
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user