dovecot-2.0: auth: When stopping, try to wait for auth clients t...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jun 4 17:25:07 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/5260724def1f
changeset: 11469:5260724def1f
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 04 15:25:03 2010 +0100
description:
auth: When stopping, try to wait for auth clients to disconnect.
This should avoid auth failures during config reloads.

diffstat:

 src/auth/main.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r c7ab127fe8ae -r 5260724def1f src/auth/main.c
--- a/src/auth/main.c	Fri Jun 04 15:11:55 2010 +0100
+++ b/src/auth/main.c	Fri Jun 04 15:25:03 2010 +0100
@@ -248,6 +248,10 @@
 	master_service_client_connection_accept(conn);
 }
 
+static void auth_die(void)
+{
+	/* do nothing. auth clients should disconnect soon. */
+}
 
 int main(int argc, char *argv[])
 {
@@ -268,6 +272,7 @@
 
 	main_preinit();
 	master_service_init_finish(master_service);
+	master_service_set_die_callback(master_service, auth_die);
 	main_init();
 	master_service_run(master_service, worker ? worker_connected :
 			   client_connected);


More information about the dovecot-cvs mailing list