Commit 16bb8e8b authored by Michael Gratton's avatar Michael Gratton 🤞

Invert sense of unrecoverable erors test for better grokkability

parent 4fe1fcde
......@@ -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(
......
......@@ -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());
......
......@@ -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 ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment