diff options
-rw-r--r-- | mail/mail-send-recv.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index c9334bdf59..6de97a26b9 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -1028,6 +1028,7 @@ refresh_folders_exec (struct _refresh_folders_msg *m, { CamelFolder *folder; gint i; + gboolean success; GError *local_error = NULL; gulong handler_id = 0; @@ -1036,6 +1037,11 @@ refresh_folders_exec (struct _refresh_folders_msg *m, m->info->cancellable, "cancelled", G_CALLBACK (main_op_cancelled_cb), cancellable); + success = camel_service_connect_sync ( + CAMEL_SERVICE (m->store), cancellable, error); + if (!success) + goto exit; + get_folders (m->store, m->folders, m->finfo); camel_operation_push_message (m->info->cancellable, _("Updating...")); @@ -1084,7 +1090,8 @@ refresh_folders_exec (struct _refresh_folders_msg *m, camel_operation_pop_message (m->info->cancellable); - if (cancellable) +exit: + if (handler_id > 0) g_signal_handler_disconnect (m->info->cancellable, handler_id); } |