[dovecot-cvs] dovecot/src/auth auth-worker-server.c,1.1,1.2
cras at dovecot.org
cras at dovecot.org
Sat May 28 18:14:15 EEST 2005
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv11924
Modified Files:
auth-worker-server.c
Log Message:
If all auth workers have died, don't complain and fail but just create and
use the new process.
Index: auth-worker-server.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-worker-server.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- auth-worker-server.c 2 Mar 2005 20:46:25 -0000 1.1
+++ auth-worker-server.c 28 May 2005 15:14:12 -0000 1.2
@@ -247,16 +247,17 @@
conn = auth_worker_find_free();
if (conn == NULL) {
- /* no connections currently. shouldn't happen unless they
- all just crashed.. */
- auth_request_log_error(auth_request, "worker-server",
- "All auth workers have died");
- reply = t_strdup_printf("FAIL\t%d",
- PASSDB_RESULT_INTERNAL_FAILURE);
- callback(auth_request, reply);
-
- auth_worker_create();
- return;
+ /* no connections currently. can happen if all have been
+ idle for last 10 minutes. create a new one. */
+ conn = auth_worker_create();
+ if (conn == NULL) {
+ auth_request_log_error(auth_request, "worker-server",
+ "Couldn't create new auth worker");
+ reply = t_strdup_printf("FAIL\t%d",
+ PASSDB_RESULT_INTERNAL_FAILURE);
+ callback(auth_request, reply);
+ return;
+ }
}
iov[0].iov_base = t_strdup_printf("%d\t", ++conn->id_counter);
More information about the dovecot-cvs
mailing list