mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-13 16:22:43 +10:00
fix(download manager): don't crash download manager if multiple errors
come in
This commit is contained in:
@ -284,8 +284,7 @@ impl DownloadManagerBuilder {
|
||||
}
|
||||
fn manage_error_signal(&mut self, error: ApplicationDownloadError) {
|
||||
debug!("got signal Error");
|
||||
let current_agent = self.current_download_agent.clone().unwrap();
|
||||
|
||||
if let Some(current_agent) = self.current_download_agent.clone() {
|
||||
current_agent.on_error(&self.app_handle, error.clone());
|
||||
|
||||
self.stop_and_wait_current_download();
|
||||
@ -293,6 +292,7 @@ impl DownloadManagerBuilder {
|
||||
|
||||
self.set_status(DownloadManagerStatus::Error(error));
|
||||
}
|
||||
}
|
||||
fn manage_cancel_signal(&mut self, meta: &DownloadableMetadata) {
|
||||
debug!("got signal Cancel");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user