]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: stats_event_callback() - Skip if conn.output is already closed
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 27 Mar 2023 08:19:38 +0000 (08:19 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 3 Apr 2023 04:41:44 +0000 (04:41 +0000)
This also prevents further errors from happening on the closed stream.

src/lib-master/stats-client.c

index 6bff4753657553780ecedde543b81a915c8ef095..3499069e1de7cf7a72bcdd802afea9336ea07dad 100644 (file)
@@ -239,7 +239,7 @@ stats_event_callback(struct event *event, enum event_callback_type type,
                return TRUE;
        struct stats_client *client =
                (struct stats_client *)stats_clients->connections;
-       if (client->conn.output == NULL)
+       if (client->conn.output == NULL || client->conn.output->closed)
                return TRUE;
 
        switch (type) {