diff --git a/src/com/android/email/imap2/Imap2SyncService.java b/src/com/android/email/imap2/Imap2SyncService.java index 858ef2c0c..70bbe21bc 100644 --- a/src/com/android/email/imap2/Imap2SyncService.java +++ b/src/com/android/email/imap2/Imap2SyncService.java @@ -2165,6 +2165,14 @@ public class Imap2SyncService extends AbstractSyncService { } } finally { + // Don't kill the connection until mBodyThread is done... + if (mBodyThread != null) { + try { + mBodyThread.join(); + } catch (InterruptedException e) { + // Just finish... + } + } if (mConnection != null) { try { // Try to logout