Geary does not recover after dropped/reset connection: Closes #5241
Nate's log from this morning pointed to the culprit, namely that if the connection fails while first establishing it, not all the proper signals are being fired which trigger an attempt to reestablish the connection in ConversationMonitor.
This commit is contained in:
parent
39f5df3896
commit
e58f2c3ea5
2 changed files with 10 additions and 6 deletions
|
|
@ -614,6 +614,8 @@ public class Geary.ConversationMonitor : Object {
|
|||
}
|
||||
|
||||
private void on_folder_closed(Folder.CloseReason reason) {
|
||||
debug("Folder %s close reason %s", folder.to_string(), reason.to_string());
|
||||
|
||||
// watch for errors; these indicate a retry should occur
|
||||
if (reason.is_error() && reestablish_connections)
|
||||
retry_connection = true;
|
||||
|
|
|
|||
|
|
@ -448,21 +448,23 @@ private class Geary.GenericImapFolder : Geary.AbstractFolder {
|
|||
// because by the time this operation completes the folder is considered closed. That
|
||||
// may not be important to most callers, however.
|
||||
closing_remote_folder.close_async.begin(cancellable);
|
||||
|
||||
notify_closed(remote_reason);
|
||||
} else {
|
||||
notify_closed(Geary.Folder.CloseReason.REMOTE_CLOSE);
|
||||
}
|
||||
|
||||
// use remote_reason even if remote_folder was null; it could be that the error occurred
|
||||
// while opening and remote_folder was yet unassigned ... also, need to call this every
|
||||
// time, even if remote was not fully opened, as some callers rely on order of signals
|
||||
notify_closed(remote_reason);
|
||||
|
||||
// close local store
|
||||
try {
|
||||
yield local_folder.close_async(cancellable);
|
||||
|
||||
notify_closed(local_reason);
|
||||
} catch (Error local_err) {
|
||||
debug("Error closing %s local store: %s", to_string(), local_err.message);
|
||||
}
|
||||
|
||||
// see above note for why this must be called every time
|
||||
notify_closed(local_reason);
|
||||
|
||||
// Close the replay queues *after* the folder has been closed (in case any final upcalls
|
||||
// come and can be handled)
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue