]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: Non-listening processes should die when their std-client is destroyed.
authorTimo Sirainen <tss@iki.fi>
Thu, 4 Jun 2009 16:45:14 +0000 (12:45 -0400)
committerTimo Sirainen <tss@iki.fi>
Thu, 4 Jun 2009 16:45:14 +0000 (12:45 -0400)
--HG--
branch : HEAD

src/lib-master/master-service.c

index 2a5dea6036e56f0d27e7110897eeb584bf243dbb..5e9440ee15d3b76654f0b97cfc38f0a478ddf755 100644 (file)
@@ -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);
        }
 }