mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
enhance: avoid unhandled exceptions in timer
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
55be1ad1ca
commit
8e55ba1b47
1 changed files with 29 additions and 22 deletions
|
@ -2512,6 +2512,8 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
|
||||
private void AutoFetchImpl(object sender)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!_settings.EnableAutoFetch || _isAutoFetching)
|
||||
return;
|
||||
|
@ -2538,6 +2540,11 @@ namespace SourceGit.ViewModels
|
|||
_lastFetchTime = DateTime.Now;
|
||||
Dispatcher.UIThread.Invoke(() => IsAutoFetching = false);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// DO nothing, but prevent `System.AggregateException`
|
||||
}
|
||||
}
|
||||
|
||||
private string _fullpath = string.Empty;
|
||||
private string _gitDir = string.Empty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue