1
0
mirror of https://github.com/etesync/android synced 2025-01-08 23:01:09 +00:00

Cleanup sync manager exception handling a bit.

This commit is contained in:
Tom Hacohen 2017-02-20 19:21:38 +00:00
parent ef8ae03e24
commit 942276284e

View File

@ -182,12 +182,10 @@ abstract public class SyncManager {
} catch (IOException e) {
App.log.log(Level.WARNING, "I/O exception during sync, trying again later", e);
syncResult.stats.numIoExceptions++;
} catch (Exceptions.ServiceUnavailableException e) {
long retryAfter = (e.retryAfter > 0) ? e.retryAfter : Constants.DEFAULT_RETRY_DELAY;
syncResult.delayUntil = retryAfter;
syncResult.delayUntil = (e.retryAfter > 0) ? e.retryAfter : Constants.DEFAULT_RETRY_DELAY;
} catch (InterruptedException e) {
return;
} catch (Exception | OutOfMemoryError e) {
if (e instanceof Exceptions.UnauthorizedException) {
syncResult.stats.numAuthExceptions++;