Mercurial > dovecot > core-2.2
changeset 10022:f14b6c68ddce HEAD
master: Allow idle-killing the last service process, except anvil.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 09 Oct 2009 17:42:33 -0400 |
parents | 20b8f66d9f4e |
children | f69fda5d7af5 |
files | src/master/service-monitor.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/service-monitor.c Fri Oct 09 17:23:27 2009 -0400 +++ b/src/master/service-monitor.c Fri Oct 09 17:42:33 2009 -0400 @@ -28,10 +28,8 @@ { struct service *service = process->service; - if (service->process_avail <= service->set->process_min_avail || - service->process_avail == 1) { - /* we don't have any extra idling processes. and if there's - no minimum limit, never kill the last process anyway */ + if (service->process_avail <= service->set->process_min_avail) { + /* we don't have any extra idling processes anymore. */ timeout_remove(&process->to_idle); } else { if (kill(process->pid, SIGINT) < 0 && errno != ESRCH) { @@ -79,7 +77,8 @@ if (status->available_count == service->client_limit) { process->idle_start = ioloop_time; if (service->process_avail > service->set->process_min_avail && - process->to_idle == NULL) { + process->to_idle == NULL && + service->type != SERVICE_TYPE_ANVIL) { /* we have more processes than we really need. add a bit of randomness so that we don't send the signal to all of them at once */