Mercurial > dovecot > core-2.2
changeset 13736:6b62d786fdc4
auth: Handle auth worker creation failure without killing the whole auth process.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 19 Nov 2011 23:28:18 +0200 |
parents | 6e87e399ccd7 |
children | ffb2993c99cf |
files | src/auth/auth-worker-server.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth-worker-server.c Sat Nov 19 23:15:19 2011 +0200 +++ b/src/auth/auth-worker-server.c Sat Nov 19 23:28:18 2011 +0200 @@ -155,12 +155,13 @@ fd = net_connect_unix_with_retries(worker_socket_path, 5000); if (fd == -1) { if (errno == EACCES) { - i_fatal("%s", eacces_error_get("net_connect_unix", + i_error("%s", eacces_error_get("net_connect_unix", worker_socket_path)); } else { - i_fatal("net_connect_unix(%s) failed: %m", + i_error("net_connect_unix(%s) failed: %m", worker_socket_path); } + return NULL; } conn = i_new(struct auth_worker_connection, 1); @@ -217,7 +218,8 @@ if (idle_count == 0 && restart) { conn = auth_worker_create(); - auth_worker_request_send_next(conn); + if (conn != NULL) + auth_worker_request_send_next(conn); } }