dovecot-2.0: *-login: If we've a pending shutdown and auth conne...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Dec 10 03:29:01 EET 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/a164075ea33a
changeset: 10449:a164075ea33a
user: Timo Sirainen <tss at iki.fi>
date: Wed Dec 09 20:28:54 2009 -0500
description:
*-login: If we've a pending shutdown and auth connection gets lost, kill clients.
If master and auth processes had died, we would never get another connection.
diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
src/login-common/main.c | 11 ++++++++++-
diffs (36 lines):
diff -r 32e77c570529 -r a164075ea33a src/login-common/main.c
--- a/src/login-common/main.c Wed Dec 09 20:19:03 2009 -0500
+++ b/src/login-common/main.c Wed Dec 09 20:28:54 2009 -0500
@@ -27,6 +27,7 @@ const struct login_settings *global_logi
const struct login_settings *global_login_settings;
void **global_other_settings;
+static bool shutting_down = FALSE;
static bool ssl_connections = FALSE;
void login_refresh_proctitle(void)
@@ -52,7 +53,13 @@ void login_refresh_proctitle(void)
static void login_die(void)
{
+ shutting_down = TRUE;
login_proxy_kill_idle();
+
+ if (auth_client == NULL || !auth_client_is_connected(auth_client)) {
+ /* we don't have auth client, and we might never get one */
+ clients_destroy_all();
+ }
}
static void client_connected(const struct master_service_connection *conn)
@@ -102,7 +109,9 @@ static void auth_connect_notify(struct a
bool connected, void *context ATTR_UNUSED)
{
if (connected)
- clients_notify_auth_connected();
+ clients_notify_auth_connected();
+ else if (shutting_down)
+ clients_destroy_all();
}
static bool anvil_reconnect_callback(void)
More information about the dovecot-cvs
mailing list