]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Change IO context earlier while shutting down
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 2 Mar 2021 15:10:03 +0000 (17:10 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 5 Mar 2021 12:36:50 +0000 (12:36 +0000)
This didn't practically cause any issues currently, but the new behavior
is more correct and future-proof.

src/pop3/pop3-client.c

index 3b9ea58ef885a64dfb2d1d45cb960a0d32292f2f..4b3585f61667f157bddacf16088cbf89c7fc5149 100644 (file)
@@ -840,11 +840,11 @@ static int client_output(struct client *client)
 void clients_destroy_all(void)
 {
        while (pop3_clients != NULL) {
+               mail_storage_service_io_activate_user(pop3_clients->service_user);
                if (pop3_clients->cmd == NULL) {
                        client_send_line(pop3_clients,
                                "-ERR [SYS/TEMP] Server shutting down.");
                }
-               mail_storage_service_io_activate_user(pop3_clients->service_user);
                client_destroy(pop3_clients, "Server shutting down.");
        }
 }