diff options
-rw-r--r-- | mail/e-mail-backend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c index de3945b0e2..8c47d1a497 100644 --- a/mail/e-mail-backend.c +++ b/mail/e-mail-backend.c @@ -257,6 +257,9 @@ mail_backend_prepare_for_quit_cb (EShell *shell, mail_vfolder_shutdown (); + /* Cancel all pending activities. */ + mail_cancel_all (); + if (delete_junk) e_mail_store_foreach ( (GHFunc) mail_backend_delete_junk, backend); @@ -266,10 +269,7 @@ mail_backend_prepare_for_quit_cb (EShell *shell, e_mail_store_foreach ((GHFunc) mail_backend_final_sync, &sync_data); - /* Cancel all activities. */ - mail_cancel_all (); - - /* Now we poll until all activities are actually cancelled. + /* Now we poll until all activities are actually cancelled or finished. * Reffing the activity delays quitting; the reference count * acts like a counting semaphore. */ if (mail_msg_active ()) |