mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
fix(asyncgit): log diff/blame notification channel errors
Avoid panicking when the UI channel is closed while async diff or blame workers finish, matching the status worker pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
8619c07f3f
commit
73be3f5247
2 changed files with 14 additions and 14 deletions
|
|
@ -124,13 +124,13 @@ impl AsyncBlame {
|
|||
|
||||
arc_pending.fetch_sub(1, Ordering::Relaxed);
|
||||
|
||||
sender
|
||||
.send(if notify {
|
||||
AsyncGitNotification::Blame
|
||||
} else {
|
||||
AsyncGitNotification::FinishUnchanged
|
||||
})
|
||||
.expect("error sending blame");
|
||||
if let Err(e) = sender.send(if notify {
|
||||
AsyncGitNotification::Blame
|
||||
} else {
|
||||
AsyncGitNotification::FinishUnchanged
|
||||
}) {
|
||||
log::error!("blame notify error: {e}");
|
||||
}
|
||||
});
|
||||
|
||||
Ok(None)
|
||||
|
|
|
|||
|
|
@ -140,13 +140,13 @@ impl AsyncDiff {
|
|||
|
||||
arc_pending.fetch_sub(1, Ordering::Relaxed);
|
||||
|
||||
sender
|
||||
.send(if notify {
|
||||
AsyncGitNotification::Diff
|
||||
} else {
|
||||
AsyncGitNotification::FinishUnchanged
|
||||
})
|
||||
.expect("error sending diff");
|
||||
if let Err(e) = sender.send(if notify {
|
||||
AsyncGitNotification::Diff
|
||||
} else {
|
||||
AsyncGitNotification::FinishUnchanged
|
||||
}) {
|
||||
log::error!("diff notify error: {e}");
|
||||
}
|
||||
});
|
||||
|
||||
Ok(None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue