From 3270e3f7ca705721885f13e39137445603ae1f40 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 4 Sep 2019 11:55:16 +0300 Subject: [PATCH] imap-hibernate: Fix retrying unhibernation The code that was supposed to do the retrying was never actually called. This is because move_back_start was always 0, so it always went to the "we've waited long enough" code path. --- src/imap-hibernate/imap-client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/imap-hibernate/imap-client.c b/src/imap-hibernate/imap-client.c index 21aa1cd992..e7c98e5b69 100644 --- a/src/imap-hibernate/imap-client.c +++ b/src/imap-hibernate/imap-client.c @@ -232,7 +232,8 @@ static bool imap_client_try_move_back(struct imap_client *client) int max_secs = client->input_pending ? IMAP_CLIENT_MOVE_BACK_WITH_INPUT_TIMEOUT_SECS : IMAP_CLIENT_MOVE_BACK_WITHOUT_INPUT_TIMEOUT_SECS; - if (ioloop_time - client->move_back_start > max_secs) { + if (client->move_back_start != 0 && + ioloop_time - client->move_back_start > max_secs) { /* we've waited long enough */ imap_client_destroy(&client, error); return TRUE; -- 2.47.3