mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
8cff6353a6
commit
19c2da1773
|
@ -7,7 +7,6 @@ import android.preference.PreferenceManager;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import javax.mail.MessagingException;
|
|
||||||
import javax.mail.Session;
|
import javax.mail.Session;
|
||||||
import javax.mail.Store;
|
import javax.mail.Store;
|
||||||
|
|
||||||
|
@ -75,7 +74,7 @@ public class WorkerFolderSync extends Worker {
|
||||||
Log.i(account.name + " closing");
|
Log.i(account.name + " closing");
|
||||||
db.account().setAccountState(account.id, "closing");
|
db.account().setAccountState(account.id, "closing");
|
||||||
istore.close();
|
istore.close();
|
||||||
} catch (MessagingException ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
} finally {
|
} finally {
|
||||||
Log.i(account.name + " closed");
|
Log.i(account.name + " closed");
|
||||||
|
|
|
@ -8,7 +8,6 @@ import java.util.Date;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import javax.mail.Folder;
|
import javax.mail.Folder;
|
||||||
import javax.mail.MessagingException;
|
|
||||||
import javax.mail.Session;
|
import javax.mail.Session;
|
||||||
import javax.mail.Store;
|
import javax.mail.Store;
|
||||||
import javax.mail.event.StoreEvent;
|
import javax.mail.event.StoreEvent;
|
||||||
|
@ -107,7 +106,7 @@ public class WorkerOperations extends Worker {
|
||||||
db.account().setAccountState(account.id, "closing");
|
db.account().setAccountState(account.id, "closing");
|
||||||
db.folder().setFolderState(folder.id, "closing");
|
db.folder().setFolderState(folder.id, "closing");
|
||||||
istore.close();
|
istore.close();
|
||||||
} catch (MessagingException ex) {
|
} catch (Throwable ex) {
|
||||||
Log.w(ex);
|
Log.w(ex);
|
||||||
} finally {
|
} finally {
|
||||||
Log.i(account.name + " closed");
|
Log.i(account.name + " closed");
|
||||||
|
|
Loading…
Reference in New Issue