From 942276284eaa0705ca96fefd852c6a416befd6c5 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 20 Feb 2017 19:21:38 +0000 Subject: [PATCH] Cleanup sync manager exception handling a bit. --- .../java/at/bitfire/davdroid/syncadapter/SyncManager.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/at/bitfire/davdroid/syncadapter/SyncManager.java b/app/src/main/java/at/bitfire/davdroid/syncadapter/SyncManager.java index 1879e478..8d437ad6 100644 --- a/app/src/main/java/at/bitfire/davdroid/syncadapter/SyncManager.java +++ b/app/src/main/java/at/bitfire/davdroid/syncadapter/SyncManager.java @@ -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++;