]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 27 Mar 2017 10:03:44 +0000 (13:03 +0300)
src/pop3/pop3-client.c

index 7c7018e0b17adb6808836228c3880e2aa32f2f6c..9cde282d4b0873cccf5a2b93e5ac54e74028051c 100644 (file)
@@ -625,10 +625,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)
@@ -651,6 +647,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--;