Bug 740637 - Better handling of unexpected failures during info/collections fetch. r=liuche,nalexander

This commit is contained in:
Richard Newman 2012-03-29 16:48:55 -07:00
parent a08ecc1df8
commit 76007d5a55
3 changed files with 9 additions and 7 deletions

View File

@ -107,9 +107,13 @@ public class InfoCollections implements SyncStorageRequestDelegate {
ThreadPool.run(new Runnable() {
@Override
public void run() {
r.get();
try {
r.get();
} catch (Exception e) {
callback.handleError(e);
}
}});
} catch (URISyntaxException e) {
} catch (Exception e) {
callback.handleError(e);
}
}

View File

@ -18,7 +18,6 @@ import org.mozilla.gecko.sync.GlobalSession;
import org.mozilla.gecko.sync.HTTPFailureException;
import org.mozilla.gecko.sync.Logger;
import org.mozilla.gecko.sync.NoCollectionKeysSetException;
import org.mozilla.gecko.sync.Utils;
import org.mozilla.gecko.sync.crypto.CryptoException;
import org.mozilla.gecko.sync.crypto.KeyBundle;
import org.mozilla.gecko.sync.delegates.ClientsDataDelegate;

View File

@ -300,12 +300,11 @@ public class SyncAdapter extends AbstractThreadedSyncAdapter implements GlobalSe
long next = System.currentTimeMillis() + MINIMUM_SYNC_INTERVAL_MILLISECONDS;
Log.i(LOG_TAG, "Setting minimum next sync time to " + next);
extendEarliestNextSync(next);
// And we're done with HTTP stuff.
stale.shutdown();
} catch (InterruptedException e) {
Log.i(LOG_TAG, "Waiting on sync monitor interrupted.", e);
} finally {
// And we're done with HTTP stuff.
stale.shutdown();
}
}
}