From: Timo Sirainen Date: Thu, 4 Jun 2009 16:45:14 +0000 (-0400) Subject: lib-master: Non-listening processes should die when their std-client is destroyed. X-Git-Tag: 2.0.alpha1~611 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c668292359474a4aa8c608b30a858337fa3fc813;p=thirdparty%2Fdovecot%2Fcore.git lib-master: Non-listening processes should die when their std-client is destroyed. --HG-- branch : HEAD --- diff --git a/src/lib-master/master-service.c b/src/lib-master/master-service.c index 2a5dea6036..5e9440ee15 100644 --- a/src/lib-master/master-service.c +++ b/src/lib-master/master-service.c @@ -425,11 +425,12 @@ void master_service_client_connection_destroyed(struct master_service *service) } master_status_update(service); - if (service->io_status_error == NULL && + if ((service->io_status_error == NULL || service->listeners == NULL) && service->master_status.available_count == service->total_available_count) { - /* master has closed the connection and we have nothing else - to do anymore. */ + /* we've finished handling all clients, and + a) master has closed the connection + b) there are no listeners (std-client?) */ master_service_stop(service); } }