aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-11-23 23:23:42 +0800
committerMilan Crha <mcrha@redhat.com>2012-11-23 23:24:18 +0800
commit5224a67bac6bb25a6280a578cfc722111a709b9a (patch)
tree4258c5de4090cbc81a415b5368fd15a26a01975d
parentaf8b1fc77878ee3aec054bdb20a3262ba9735b52 (diff)
downloadgsoc2013-evolution-5224a67bac6bb25a6280a578cfc722111a709b9a.tar.gz
gsoc2013-evolution-5224a67bac6bb25a6280a578cfc722111a709b9a.tar.zst
gsoc2013-evolution-5224a67bac6bb25a6280a578cfc722111a709b9a.zip
Bug #688819 - It's possible to make Evolution stop sending emails
-rw-r--r--libemail-engine/e-mail-session-utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c
index f26981df33..86c2545c9b 100644
--- a/libemail-engine/e-mail-session-utils.c
+++ b/libemail-engine/e-mail-session-utils.c
@@ -576,10 +576,16 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
context->message, context->from,
context->recipients, cancellable, &error);
- if (did_connect)
+ if (did_connect) {
+ /* if the cancellable is cancelled, then the disconnect will not run,
+ thus reset it to ensure the service will be properly disconnected */
+ if (cancellable)
+ g_cancellable_reset (cancellable);
+
camel_service_disconnect_sync (
service, error == NULL,
cancellable, error ? NULL : &error);
+ }
g_object_unref (service);