[geary/wip/remote-retry] Prevent hang when closing and re-opening and network not available
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/remote-retry] Prevent hang when closing and re-opening and network not available
- Date: Thu, 22 Jan 2015 22:49:27 +0000 (UTC)
commit 0ef874fc5267f56faace78107289e54a76df642c
Author: Jim Nelson <jim yorba org>
Date: Thu Jan 22 14:49:10 2015 -0800
Prevent hang when closing and re-opening and network not available
.../imap-engine/imap-engine-minimal-folder.vala | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-minimal-folder.vala
b/src/engine/imap-engine/imap-engine-minimal-folder.vala
index 16a8fb2..fd1990c 100644
--- a/src/engine/imap-engine/imap-engine-minimal-folder.vala
+++ b/src/engine/imap-engine/imap-engine-minimal-folder.vala
@@ -813,15 +813,18 @@ private class Geary.ImapEngine.MinimalFolder : Geary.Folder, Geary.FolderSupport
// Close the replay queues; if a "clean" close, flush pending operations so everything
// gets a chance to run; if forced close, drop everything outstanding
try {
+ // swap out the ReplayQueue while closing so, if re-opened, future commands can
+ // be queued on the new queue
+ ReplayQueue closing_replay_queue = replay_queue;
+ replay_queue = new ReplayQueue(this);
+
debug("Closing replay queue for %s (flush_pending=%s): %s", to_string(),
- flush_pending.to_string(), replay_queue.to_string());
- yield replay_queue.close_async(flush_pending);
- debug("Closed replay queue for %s: %s", to_string(), replay_queue.to_string());
+ flush_pending.to_string(), closing_replay_queue.to_string());
+ yield closing_replay_queue.close_async(flush_pending);
+ debug("Closed replay queue for %s: %s", to_string(), closing_replay_queue.to_string());
} catch (Error replay_queue_err) {
debug("Error closing %s replay queue: %s", to_string(), replay_queue_err.message);
}
-
- replay_queue = new ReplayQueue(this);
}
// if a "clean" close, now go ahead and close the folder
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]