From: Timo Sirainen Date: Wed, 7 Jun 2017 20:47:56 +0000 (+0300) Subject: master: Don't include imap-hibernate when counting auth's max client_limit X-Git-Tag: 2.3.0.rc1~1479 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=352bbeb5ad8cc3630bf18e30a65bf6a15138843b;p=thirdparty%2Fdovecot%2Fcore.git master: Don't include imap-hibernate when counting auth's max client_limit imap-hibernate doesn't do any auth connections, so it doesn't need it. It's a bit ugly to add an explicit service name comparison here, but there didn't really seem to be many other good choices: * Could have removed protocol=imap from imap-hibernate. I was close to doing this, but maybe it's better that imap-only processes would have their protocol set to "imap". * Could have added a new service type, but seems pretty unnecessary to add some kind of a "nonauth" just for this. A reverse "needs-auth" might have been ok though. Perhaps in future we'll implement proper dependencies across services and those dependencies could be used to calculate this limit more precisely. --- diff --git a/src/master/master-settings.c b/src/master/master-settings.c index 586939f125..3e416da72c 100644 --- a/src/master/master-settings.c +++ b/src/master/master-settings.c @@ -574,9 +574,11 @@ master_settings_verify(void *_set, pool_t pool, const char **error_r) if (*service->protocol != '\0') { /* each imap/pop3/lmtp process can use up a connection, - although if service_count=1 it's only temporary */ - if (service->service_count != 1 || - strcmp(service->type, "login") == 0) + although if service_count=1 it's only temporary. + imap-hibernate doesn't do any auth lookups. */ + if ((service->service_count != 1 || + strcmp(service->type, "login") == 0) && + strcmp(service->name, "imap-hibernate") != 0) max_auth_client_processes += process_limit; } if (strcmp(service->type, "login") == 0 ||