diff -up evolution-data-server-3.8.5/camel/camel-imapx-server.c.eds evolution-data-server-3.8.5/camel/camel-imapx-server.c --- evolution-data-server-3.8.5/camel/camel-imapx-server.c.eds 2013-11-07 09:46:45.524877569 +0100 +++ evolution-data-server-3.8.5/camel/camel-imapx-server.c 2013-11-07 09:48:20.332871086 +0100 @@ -6963,13 +6963,8 @@ imapx_parser_thread (gpointer d) g_clear_error (&local_error); - return NULL; -} + g_object_unref (is); -static gpointer -join_helper (gpointer thread) -{ - g_thread_join (thread); return NULL; } @@ -7041,14 +7036,8 @@ imapx_server_dispose (GObject *object) } QUEUE_UNLOCK (server); - if (server->parser_thread) { - if (server->parser_thread == g_thread_self ()) { - GThread *thread; - - thread = g_thread_new (NULL, join_helper, server->parser_thread); - g_thread_unref (thread); - } else - g_thread_join (server->parser_thread); + if (server->parser_thread != NULL) { + g_thread_unref (server->parser_thread); server->parser_thread = NULL; } @@ -7288,7 +7277,8 @@ camel_imapx_server_connect (CamelIMAPXSe if (!imapx_reconnect (is, cancellable, error)) return FALSE; - is->parser_thread = g_thread_new (NULL, (GThreadFunc) imapx_parser_thread, is); + is->parser_thread = g_thread_new ( + NULL, (GThreadFunc) imapx_parser_thread, g_object_ref (is)); return TRUE; }