mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-23 21:34:18 +08:00
Merge branch 'fetch-hang' into 'master'
Fix hang on fetch See merge request redox-os/cookbook!684
This commit is contained in:
commit
b20cbd0d38
@ -293,14 +293,10 @@ fn repo_inner(
|
||||
app.dump_logs_anyway = true;
|
||||
let th = thread::spawn(move || {
|
||||
while let Ok(update) = status_rx.recv() {
|
||||
let mut should_break = false;
|
||||
if let StatusUpdate::FlushLog(_p, _q) = &update {
|
||||
should_break = true;
|
||||
}
|
||||
app.update_status(update);
|
||||
if should_break {
|
||||
if update == StatusUpdate::CookThreadFinished {
|
||||
break;
|
||||
}
|
||||
app.update_status(update);
|
||||
}
|
||||
});
|
||||
let mut logger = Some((&mut stdout_writer, &mut stderr_writer));
|
||||
@ -316,6 +312,9 @@ fn repo_inner(
|
||||
.send(StatusUpdate::FlushLog(recipe.name.clone(), log_path))
|
||||
.unwrap_or_default();
|
||||
}
|
||||
status_tx
|
||||
.send(StatusUpdate::CookThreadFinished)
|
||||
.unwrap_or_default();
|
||||
let _ = th.join();
|
||||
}
|
||||
CliCommand::Unfetch => handle_clean(recipe, config, true, true)?,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user