From 3093b6166865abab4a299bb384c77d91ac348cb9 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Tue, 13 Apr 2010 18:05:16 -0700 Subject: [PATCH] Try a longer timeout for initial sync * We are still seeing an issue with at least one user on initial calendar sync. * Increase the read timeout a great deal for initial sync, as it can a very long time for the server to respond Bug: 2569162 Change-Id: I495c38dc58d9a80c5a21e40b6fc5d165d10a3c1a --- src/com/android/exchange/EasSyncService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/exchange/EasSyncService.java b/src/com/android/exchange/EasSyncService.java index 44867192b..642ea2978 100644 --- a/src/com/android/exchange/EasSyncService.java +++ b/src/com/android/exchange/EasSyncService.java @@ -125,7 +125,7 @@ public class EasSyncService extends AbstractSyncService { // us to detect a silently dropped connection). The allowance is defined below. static private final int COMMAND_TIMEOUT = 20*SECONDS; // Connection timeout is the time given to connect to the server before reporting an IOException - static private final int CONNECTION_TIMEOUT = 30*SECONDS; + static private final int CONNECTION_TIMEOUT = 20*SECONDS; // The extra time allowed beyond the COMMAND_TIMEOUT before which our watchdog alarm triggers static private final int WATCHDOG_TIMEOUT_ALLOWANCE = 10*SECONDS; @@ -1891,8 +1891,8 @@ public class EasSyncService extends AbstractSyncService { // EAS doesn't like GetChanges if the syncKey is "0"; not documented s.tag(Tags.SYNC_GET_CHANGES); } else { - // Use 2x timeout for initial sync, which empirically can take a while longer - timeout <<= 1; + // Use enormous timeout for initial sync, which empirically can take a while longer + timeout = 120*SECONDS; } s.data(Tags.SYNC_WINDOW_SIZE, className.equals("Email") ? EMAIL_WINDOW_SIZE : PIM_WINDOW_SIZE);