Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3532:4f7427a5be61 HEAD
If auth worker socket isn't created yet when we try to connect to it, try
for 5 seconds before aborting. (previous fix didn't work)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 14 Aug 2005 23:34:33 +0300 |
parents | c506ec006de5 |
children | 3ec5c6665bec |
files | src/auth/auth-worker-server.c |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/auth-worker-server.c Sun Aug 14 22:40:29 2005 +0300 +++ b/src/auth/auth-worker-server.c Sun Aug 14 23:34:33 2005 +0300 @@ -58,13 +58,19 @@ if (fd >= 0) break; - if (errno != EAGAIN) { + if (errno == EAGAIN) { + /* we're busy */ + } else if (errno == ENOENT) { + /* master didn't yet create it? */ + } else { i_fatal("net_connect_unix(%s) failed: %m", worker_socket_path); } - if (errno != ENOENT || try == 5) { - /* busy / broken */ - return NULL; + + if (try == 5) { + i_fatal("net_connect_unix(%s) " + "failed after %d tries: %m", + worker_socket_path, try); } /* not created yet? try again */