Don't logout of Imap while body loading continues

Change-Id: Ibb79c8436851863dac582478fef32344b9269d3f
This commit is contained in:
Marc Blank 2012-09-03 10:52:44 -07:00
parent b82ae909d7
commit 96e13d4d8c

View File

@ -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