installer: start new bitcoind download if not finished
In case user clicks on Previous before bitcoind download has finished, this will clear the incomplete download from `InternalBitcoindStep` so that a new download will start if the user returns to this step.
This commit is contained in:
parent
cf9404558f
commit
bdd16c73bc
@ -658,6 +658,13 @@ impl Step for InternalBitcoindStep {
|
||||
bitcoind.stop();
|
||||
}
|
||||
self.internal_bitcoind = None;
|
||||
if let Some(download) = self.exe_download.as_ref() {
|
||||
// Clear exe_download if not Finished.
|
||||
if let DownloadState::Finished { .. } = download.state {
|
||||
} else {
|
||||
self.exe_download = None;
|
||||
}
|
||||
}
|
||||
self.started = None; // clear both Ok and Err
|
||||
return Command::perform(async {}, |_| Message::Previous);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user