Mercurial > dovecot > core-2.2
changeset 10034:cf376fcbd6ff HEAD
*-login: Close auth client connection after (proxying) process no longer needs it.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 09 Oct 2009 21:32:04 -0400 |
parents | 40a71105529b |
children | d7b3ed9814cb |
files | src/login-common/client-common.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/login-common/client-common.c Fri Oct 09 21:25:27 2009 -0400 +++ b/src/login-common/client-common.c Fri Oct 09 21:32:04 2009 -0400 @@ -157,7 +157,14 @@ if (client->ssl_proxy != NULL) ssl_proxy_free(&client->ssl_proxy); client->v.destroy(client); - client_unref(&client); + if (client_unref(&client) && + master_service_get_service_count(master_service) == 1) { + /* as soon as this connection is done with proxying + (or whatever), the process will die. there's no need for + authentication anymore, so close the connection. */ + if (auth_client != NULL) + auth_client_deinit(&auth_client); + } } void client_destroy_success(struct client *client, const char *reason)