[dovecot-cvs] dovecot/src/auth auth-worker-server.c,1.5,1.6
cras at dovecot.org
cras at dovecot.org
Sun Aug 14 23:34:36 EEST 2005
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv13739/auth
Modified Files:
auth-worker-server.c
Log Message:
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)
Index: auth-worker-server.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-worker-server.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- auth-worker-server.c 3 Jul 2005 21:19:44 -0000 1.5
+++ auth-worker-server.c 14 Aug 2005 20:34:33 -0000 1.6
@@ -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 */
More information about the dovecot-cvs
mailing list