From 4ffe045cb60964930d94977c8d210d08c98beb65 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Mon, 1 Feb 2010 20:28:00 +0530 Subject: [PATCH] Fix a hang while quitting evo --- camel/providers/imapx/camel-imapx-server.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c index 5b31255..379bdf7 100644 --- a/camel/providers/imapx/camel-imapx-server.c +++ b/camel/providers/imapx/camel-imapx-server.c @@ -3108,6 +3108,9 @@ imapx_parser_thread (gpointer d) CAMEL_SERVICE_REC_UNLOCK (is->store, connect_lock); cancel_all_jobs (is, &ex); + + if (imapx_idle_supported (is)) + imapx_exit_idle (is); } if (errno == EINTR) @@ -3204,9 +3207,6 @@ imapx_disconnect (CamelIMAPXServer *is) { gboolean ret = TRUE; - if (imapx_idle_supported (is)) - imapx_exit_idle (is); - if (is->stream) { if (camel_stream_close (is->stream->source) == -1) ret = FALSE; @@ -3268,6 +3268,9 @@ camel_imapx_server_connect(CamelIMAPXServer *is, gint state) } else { imapx_disconnect (is); + if (imapx_idle_supported (is)) + imapx_exit_idle (is); + pthread_join (is->parser_thread_id, NULL); ret = TRUE; } -- 2.7.4