]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Improve disconnection log message if it happens immediately after unhibernation
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 23 Mar 2023 23:45:34 +0000 (01:45 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 24 Mar 2023 11:14:36 +0000 (11:14 +0000)
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

index 8ffbf1d9c46d76649d644a08acfcb31e79c6b4b7..5895f2ed83c34641c32e746dc1dadbca79f3da56 100644 (file)
@@ -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. */