]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Start autoexpunging only after client is disconnected
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 23 Mar 2017 12:08:53 +0000 (14:08 +0200)
committerGitLab <gitlab@git.dovecot.net>
Thu, 23 Mar 2017 17:21:35 +0000 (19:21 +0200)
src/pop3/pop3-client.c

index 8cf7800c2836ccf8789143c3f4b78b8048196eb2..0a8aad6f34f363aa5589ce4ed8bf7c6671a5d138 100644 (file)
@@ -613,10 +613,6 @@ static void client_default_destroy(struct client *client, const char *reason)
                        "\n", NULL));
        }
 
-       /* refresh proctitle before a potentially long-running user unref */
-       pop3_refresh_proctitle();
-       mail_user_unref(&client->user);
-
        if (client->session_dotlock != NULL)
                file_dotlock_delete(&client->session_dotlock);
        if (client->to_session_dotlock_refresh != NULL)
@@ -639,6 +635,10 @@ static void client_default_destroy(struct client *client, const char *reason)
        o_stream_destroy(&client->output);
 
        fd_close_maybe_stdio(&client->fd_in, &client->fd_out);
+
+       /* refresh proctitle before a potentially long-running user unref */
+       pop3_refresh_proctitle();
+       mail_user_unref(&client->user);
        mail_storage_service_user_unref(&client->service_user);
 
        pop3_client_count--;