]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: Don't include imap-hibernate when counting auth's max client_limit
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 7 Jun 2017 20:47:56 +0000 (23:47 +0300)
committerGitLab <gitlab@git.dovecot.net>
Thu, 8 Jun 2017 12:42:17 +0000 (15:42 +0300)
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.

src/master/master-settings.c

index 586939f125a80e1d70b41c368355654a626bd6df..3e416da72cbdbb22bdc656ac0d98716062d0f815 100644 (file)
@@ -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 ||