[geary/geary-0.6] Fix bug introduced in prior commit



commit 1b79dd2f09b12a3cb39ffb4ddd232bc93c4bb725
Author: Jim Nelson <jim yorba org>
Date:   Thu May 1 14:39:16 2014 -0700

    Fix bug introduced in prior commit
    
    Prior commit would retry FETCH command for *any* Error, which is
    incorrect.  It should only retry when RETRY is thrown, otherwise it
    should re-throw the Error.

 src/engine/imap/api/imap-folder.vala |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/imap/api/imap-folder.vala b/src/engine/imap/api/imap-folder.vala
index b765fe9..da6005e 100644
--- a/src/engine/imap/api/imap-folder.vala
+++ b/src/engine/imap/api/imap-folder.vala
@@ -516,10 +516,13 @@ private class Geary.Imap.Folder : BaseObject {
             try {
                 yield exec_commands_async(cmds, out fetched, null, cancellable);
             } catch (Error err) {
-                if (err is FolderError.RETRY)
+                if (err is FolderError.RETRY) {
                     debug("Retryable server failure detected for %s: %s", to_string(), err.message);
+                    
+                    continue;
+                }
                 
-                continue;
+                throw err;
             }
             
             break;


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