From 64ae13eb1082bb5d61ce9c064059b578defea164 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 24 Mar 2023 01:45:34 +0200 Subject: [PATCH] imap: Improve disconnection log message if it happens immediately after unhibernation The "No commands sent after unhibernation" can mean that imap-hibernate process saw a timeout while unhibernating and shutdown the connection. Or it can also mean just that the client itself disconnected. --- src/imap/imap-client.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index 8ffbf1d9c4..5895f2ed83 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -386,8 +386,12 @@ static const char *client_get_last_command_status(struct client *client) { if (client->logged_out) return ""; - if (client->last_cmd_name == NULL) - return " (No commands sent)"; + if (client->last_cmd_name == NULL) { + if (client->unhibernated) + return " (No commands sent after unhibernation)"; + else + return " (No commands sent)"; + } /* client disconnected without sending LOGOUT. if the last command took over 1 second to run, log it. */ -- 2.47.3