am b2e8a1b2: am 2fd0058c: Only clear sync error map on success

* commit 'b2e8a1b23c1e7cd0d12b7429adad023e25438a27':
  Only clear sync error map on success
diff --git a/exchange2/src/com/android/exchange/EasAccountService.java b/exchange2/src/com/android/exchange/EasAccountService.java
index 58ddaf3..533a5df 100644
--- a/exchange2/src/com/android/exchange/EasAccountService.java
+++ b/exchange2/src/com/android/exchange/EasAccountService.java
@@ -679,8 +679,6 @@
                         }
 
                         if (code == HttpStatus.SC_OK) {
-                            // Make sure to clear out any pending sync errors
-                            ExchangeService.removeFromSyncErrorMap(mMailboxId);
                             if (!resp.isEmpty()) {
                                 InputStream is = resp.getInputStream();
                                 int pingResult = parsePingResult(is, mContentResolver,
@@ -708,6 +706,8 @@
                                     // Act as if we have an IOException (backoff, etc.)
                                     throw new IOException();
                                 }
+                                // Make sure to clear out any pending sync errors
+                                ExchangeService.removeFromSyncErrorMap(mMailboxId);
                             } else {
                                 userLog("Ping returned empty result; throwing IOException");
                                 throw new IOException();