Catch task cancellation of App.cs syncs

This commit is contained in:
Kyle Spearrin 2016-08-19 18:42:27 -04:00
parent c27d427799
commit 8d33d8f216

View file

@ -145,6 +145,11 @@ namespace Bit.App
} }
attempt++; attempt++;
} }
catch(Exception e) when(e is TaskCanceledException || e is OperationCanceledException)
{
Debug.WriteLine("Cancellation exception.");
break;
}
} while(attempt <= 1); } while(attempt <= 1);
} }
else else
@ -178,8 +183,17 @@ namespace Bit.App
} }
attempt++; attempt++;
} }
catch(Exception e) when(e is TaskCanceledException || e is OperationCanceledException)
{
Debug.WriteLine("Cancellation exception.");
break;
}
} while(attempt <= 1); } while(attempt <= 1);
} }
else
{
Debug.WriteLine("Not connected.");
}
} }
private async void Logout(string logoutMessage) private async void Logout(string logoutMessage)