[evolution-data-server] Bug 740585 - [IMAPx] Ignore timeout when no command is running



commit 28ddf2e91aa04a189c71c37c60c2c8e858a0ef27
Author: Milan Crha <mcrha redhat com>
Date:   Thu Nov 27 15:15:13 2014 +0100

    Bug 740585 - [IMAPx] Ignore timeout when no command is running

 camel/providers/imapx/camel-imapx-server.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 0b4eeb6..bf45d83 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -7673,6 +7673,15 @@ imapx_ready_to_read (GInputStream *input_stream,
        g_clear_object (&output_stream);
        g_clear_object (&cancellable);
 
+       if (g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT)) {
+               QUEUE_LOCK (is);
+               if (camel_imapx_command_queue_is_empty (is->active) && is->state != IMAPX_SHUTDOWN) {
+                       camel_imapx_debug (io, is->tagprefix, "Ignoring timeout error, nothing was waiting 
(original error: %s)\n", local_error->message);
+                       g_clear_error (&local_error);
+               }
+               QUEUE_UNLOCK (is);
+       }
+
        if (local_error != NULL) {
                camel_imapx_debug (io, is->tagprefix, "Data read failed with error '%s'\n", 
local_error->message);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]