mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 22:28:12 -05:00
fud/tasks: send event for any error that stopped the fetch task
This commit is contained in:
@@ -65,7 +65,13 @@ pub async fn get_task(fud: Arc<Fud>, executor: ExecutorPtr) -> Result<()> {
|
||||
match res {
|
||||
Ok(()) | Err(Error::DetachedTaskStopped) => { /* Do nothing */ }
|
||||
Err(e) => {
|
||||
error!(target: "fud::get_task()", "Error while fetching resource: {e}")
|
||||
error!(target: "fud::get_task()", "Error while fetching resource: {e}");
|
||||
|
||||
// Send a DownloadError for any error that stopped the fetch task
|
||||
notify_event!(fud_2, DownloadError, {
|
||||
hash,
|
||||
error: e.to_string(),
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user