[geary/wip/555-sync-cancelled: 1/2] Fix background sync op always being cancelled on folder close



commit 9dcde70298258436f4847c6976750f78c4cd9eed
Author: Michael Gratton <mike vee net>
Date:   Fri Sep 6 22:12:57 2019 +1000

    Fix background sync op always being cancelled on folder close
    
    Unset the op's close cancellable before closing the folder so the wait
    for the folder to close is not cancelled.

 src/engine/imap-engine/imap-engine-account-synchronizer.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/engine/imap-engine/imap-engine-account-synchronizer.vala 
b/src/engine/imap-engine/imap-engine-account-synchronizer.vala
index 5244c9c8..f3397a09 100644
--- a/src/engine/imap-engine/imap-engine-account-synchronizer.vala
+++ b/src/engine/imap-engine/imap-engine-account-synchronizer.vala
@@ -149,6 +149,10 @@ private class Geary.ImapEngine.RefreshFolderSync : FolderOperation {
             );
         }
 
+        // Clear this now so that the wait for close below doesn't get
+        // cancelled as the folder closes.
+        this.closed_cancellable = null;
+
         if (was_opened) {
             try {
                 // don't pass in the Cancellable; really need this


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