From: Timo Sirainen Date: Wed, 4 Sep 2019 08:55:16 +0000 (+0300) Subject: imap-hibernate: Fix retrying unhibernation X-Git-Tag: 2.3.10~303 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3270e3f7ca705721885f13e39137445603ae1f40;p=thirdparty%2Fdovecot%2Fcore.git 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. --- 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;