From: Timo Sirainen Date: Sat, 19 Nov 2011 21:28:18 +0000 (+0200) Subject: auth: Handle auth worker creation failure without killing the whole auth process. X-Git-Tag: 2.1.rc1~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a54cf831aeadbefb74a0e66870e8c341a31eef60;p=thirdparty%2Fdovecot%2Fcore.git auth: Handle auth worker creation failure without killing the whole auth process. --- diff --git a/src/auth/auth-worker-server.c b/src/auth/auth-worker-server.c index e8f1ed342e..749e4ee50d 100644 --- a/src/auth/auth-worker-server.c +++ b/src/auth/auth-worker-server.c @@ -155,12 +155,13 @@ static struct auth_worker_connection *auth_worker_create(void) 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 @@ static void auth_worker_destroy(struct auth_worker_connection **_conn, if (idle_count == 0 && restart) { conn = auth_worker_create(); - auth_worker_request_send_next(conn); + if (conn != NULL) + auth_worker_request_send_next(conn); } }