]> 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>
Thu, 24 Aug 2023 08:15:26 +0000 (08:15 +0000)
This also prevents further errors from happening on the closed stream.

src/lib-master/stats-client.c

index b7560005b063981c13cf254c31f1f6b1a208006d..6df5d1c39955174577018801cdbfa63253773cc3 100644 (file)
@@ -238,7 +238,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) {