From: Timo Sirainen Date: Thu, 23 Mar 2023 23:45:34 +0000 (+0200) Subject: imap: Improve disconnection log message if it happens immediately after unhibernation X-Git-Tag: 2.4.0~2854 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64ae13eb1082bb5d61ce9c064059b578defea164;p=thirdparty%2Fdovecot%2Fcore.git 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. --- 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. */