]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
indexer: Disconnect from worker after each request
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 7 Sep 2021 13:52:40 +0000 (16:52 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 15 Sep 2021 10:14:44 +0000 (10:14 +0000)
service_count won't be tracked correctly otherwise.

src/indexer/worker-connection.c

index 9d23f652e5b62e613ca6d0552ca94e8d24ff4a15..871974d6a75bb59ecbeebad0125d972a57aa9988 100644 (file)
@@ -92,6 +92,10 @@ worker_connection_input_args(struct connection *conn, const char *const *args)
                ret = -1;
 
        worker_connection_call_callback(worker, percentage);
+       if (worker->request == NULL) {
+               /* disconnect after each request */
+               ret = -1;
+       }
 
        return ret;
 }