[evolution-data-server/evolution-data-server-3-12] Bug 732366 - [IMAPx] Stuck FETCH command when using IDLE
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/evolution-data-server-3-12] Bug 732366 - [IMAPx] Stuck FETCH command when using IDLE
- Date: Tue, 8 Jul 2014 14:43:30 +0000 (UTC)
commit bd6dcf21862ab61891adc1e0d6f4f9ef2f49285b
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 8 16:42:31 2014 +0200
Bug 732366 - [IMAPx] Stuck FETCH command when using IDLE
camel/providers/imapx/camel-imapx-server.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index ca36341..8086c57 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3586,7 +3586,16 @@ imapx_job_idle_start (CamelIMAPXJob *job,
g_mutex_unlock (&is->priv->idle_lock);
QUEUE_LOCK (is);
- imapx_command_start (is, ic);
+ /* It can be that another thread started a command between
+ the two locks above had been interchanged, thus also test
+ whether the active command queue is empty, before starting
+ the IDLE command. */
+ if (camel_imapx_command_queue_is_empty (is->active)) {
+ imapx_command_start (is, ic);
+ } else {
+ c (is->tagprefix, "finally cancelling IDLE, other command was quicker\n");
+ imapx_unregister_job (is, job);
+ }
} else {
g_mutex_unlock (&is->priv->idle_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]