aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-11-23 23:23:07 +0800
committerMilan Crha <mcrha@redhat.com>2012-11-23 23:23:07 +0800
commit10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b (patch)
treefb4f2c59ef6b6b570f9dd56746e936d9192d8709 /libemail-engine
parente0f12eaaf48cbf5019a0418b539799b63b19dcfb (diff)
downloadgsoc2013-evolution-10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b.tar
gsoc2013-evolution-10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b.tar.gz
gsoc2013-evolution-10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b.tar.bz2
gsoc2013-evolution-10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b.tar.lz
gsoc2013-evolution-10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b.tar.xz
gsoc2013-evolution-10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b.tar.zst
gsoc2013-evolution-10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b.zip
Bug #688819 - It's possible to make Evolution stop sending emails
Diffstat (limited to 'libemail-engine')
-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 7ec3ca3a70..94304cb6a9 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);