]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: auth-worker-client: Fix setting process title to [idling]
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 31 Oct 2019 13:36:02 +0000 (15:36 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 12 Mar 2021 12:18:13 +0000 (12:18 +0000)
The existing code was completely wrong. It was set only when LIST command
started running. For other commands it wasn't set at all.

src/auth/auth-worker-client.c

index 53ea61a9630e60b43b4b430636417a49e937e108..11fad490cd9f3d35ac9c9886fda9e84f07e0dec8 100644 (file)
@@ -106,6 +106,8 @@ auth_worker_request_finished_full(struct auth_worker_command *cmd,
        auth_worker_client_unref(&cmd->client);
        event_unref(&cmd->event);
        i_free(cmd);
+
+       auth_worker_refresh_proctitle(CLIENT_STATE_IDLE);
 }
 
 static void auth_worker_request_finished(struct auth_worker_command *cmd,
@@ -607,8 +609,6 @@ static void list_iter_deinit(struct auth_worker_list_context *ctx)
        auth_worker_request_finished(cmd, error);
        auth_request_unref(&ctx->auth_request);
        i_free(ctx);
-
-       auth_worker_refresh_proctitle(CLIENT_STATE_IDLE);
 }
 
 static void list_iter_callback(const char *user, void *context)
@@ -811,8 +811,6 @@ auth_worker_client_input_args(struct connection *conn, const char *const *args)
        if (!ret) {
                auth_worker_request_finished_bug(cmd, error);
                return -1;
-       } else if (client->conn.io == NULL) {
-               auth_worker_refresh_proctitle(CLIENT_STATE_IDLE);
        }
        auth_worker_client_unref(&client);
        return 1;