]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: If stats_writer_socket_path is empty, don't try to send stats
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 3 Apr 2020 12:32:35 +0000 (15:32 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 8 Apr 2020 07:58:04 +0000 (07:58 +0000)
src/lib-master/master-service.c

index 737a3c15940c2d7308bbab5c27f19027608713d1..1a7785dd43e6235420bbd8acad1e14b9d8ce7ca7 100644 (file)
@@ -368,7 +368,7 @@ master_service_init(const char *name, enum master_service_flags flags,
        if ((flags & MASTER_SERVICE_FLAG_DONT_SEND_STATS) == 0) {
                /* Initialize stats-client early so it can see all events. */
                value = getenv(DOVECOT_STATS_WRITER_SOCKET_PATH);
-               if (value != NULL)
+               if (value != NULL && value[0] != '\0')
                        service->stats_client = stats_client_init(value, FALSE);
        }