From 10aa3a7a99f177b02c2a9cd4d8852dfa876d1f9b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 23 Nov 2012 16:23:07 +0100 Subject: Bug #688819 - It's possible to make Evolution stop sending emails --- libemail-engine/e-mail-session-utils.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libemail-engine/e-mail-session-utils.c') 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); -- cgit v1.2.3