[geary/wip/limit-replay-op-retries] Invert sense of unrecoverable erors test for better grokkability
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/limit-replay-op-retries] Invert sense of unrecoverable erors test for better grokkability
- Date: Thu, 7 Feb 2019 03:11:16 +0000 (UTC)
commit 16bb8e8ba561993d78485ee11b5b526a1804c9c5
Author: Michael Gratton <mike vee net>
Date: Thu Feb 7 13:45:36 2019 +1100
Invert sense of unrecoverable erors test for better grokkability
src/engine/imap-engine/imap-engine-minimal-folder.vala | 2 +-
src/engine/imap-engine/imap-engine-replay-queue.vala | 2 +-
src/engine/imap-engine/imap-engine.vala | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-minimal-folder.vala
b/src/engine/imap-engine/imap-engine-minimal-folder.vala
index bef43a4a..e76c1987 100644
--- a/src/engine/imap-engine/imap-engine-minimal-folder.vala
+++ b/src/engine/imap-engine/imap-engine-minimal-folder.vala
@@ -961,7 +961,7 @@ private class Geary.ImapEngine.MinimalFolder : Geary.Folder, Geary.FolderSupport
return;
} catch (Error err) {
ErrorContext context = new ErrorContext(err);
- if (is_unrecoverable_failure(err)) {
+ if (!is_recoverable_failure(err)) {
debug("Unrecoverable failure opening remote, forcing closed: %s",
context.format_full_error());
yield force_close(
diff --git a/src/engine/imap-engine/imap-engine-replay-queue.vala
b/src/engine/imap-engine/imap-engine-replay-queue.vala
index 7cda1c45..ca64bdc1 100644
--- a/src/engine/imap-engine/imap-engine-replay-queue.vala
+++ b/src/engine/imap-engine/imap-engine-replay-queue.vala
@@ -532,7 +532,7 @@ private class Geary.ImapEngine.ReplayQueue : Geary.BaseObject {
// remote replay and not closing, re-schedule now
if (op.on_remote_error == RETRY &&
op.remote_retry_count <= MAX_OP_RETRIES &&
- !is_unrecoverable_failure(replay_err) &&
+ is_recoverable_failure(replay_err) &&
state == State.OPEN) {
debug("Schedule op retry %s on %s", op.to_string(), to_string());
diff --git a/src/engine/imap-engine/imap-engine.vala b/src/engine/imap-engine/imap-engine.vala
index 998bb1b8..5f5e926c 100644
--- a/src/engine/imap-engine/imap-engine.vala
+++ b/src/engine/imap-engine/imap-engine.vala
@@ -18,8 +18,8 @@ namespace Geary.ImapEngine {
* succeed if tried again unless some action is taken, such as
* authentication failures, protocol parsing errors, and so on.
*/
- private static bool is_unrecoverable_failure(GLib.Error err) {
- return !(
+ private static bool is_recoverable_failure(GLib.Error err) {
+ return (
err is EngineError.SERVER_UNAVAILABLE ||
err is IOError.BROKEN_PIPE ||
err is IOError.BUSY ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]