avoid thread termination by catching exception thrown on failed times GET
This commit is contained in:
parent
5bf5a2c8fa
commit
dd61368233
@ -472,6 +472,9 @@ namespace BreCalClient
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
if (shipcalls != null)
|
||||
{
|
||||
foreach (Shipcall shipcall in shipcalls)
|
||||
@ -479,7 +482,7 @@ namespace BreCalClient
|
||||
// load times for each shipcall
|
||||
List<Times> currentTimes = await _timesApi.TimesGetAsync(shipcall.Id);
|
||||
|
||||
if(!_allShipcallsDict.ContainsKey(shipcall.Id))
|
||||
if (!_allShipcallsDict.ContainsKey(shipcall.Id))
|
||||
{
|
||||
// add entry
|
||||
ShipcallControlModel scm = new()
|
||||
@ -511,6 +514,14 @@ namespace BreCalClient
|
||||
this.FilterShipcalls();
|
||||
await uiLock.WaitAsync();
|
||||
this.UpdateUI();
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_log.Error(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
uiLock.Release();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user