]> 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, 12 May 2023 13:03:46 +0000 (13:03 +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 5043ea02bf5b28f294014f2f7bf7245d9a3ea9a1..f3c16432e5a3731b8d53d53f5ce3425da9e6e4f2 100644 (file)
@@ -372,8 +372,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. */