Skip to content

Commit

Permalink
master: Don't include imap-hibernate when counting auth's max client_…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
sirainen authored and GitLab committed Jun 8, 2017
1 parent 8322e74 commit 352bbeb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/master/master-settings.c
Expand Up @@ -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 ||
Expand Down

0 comments on commit 352bbeb

Please sign in to comment.