[dovecot-cvs] dovecot/src/lib-auth auth-server-connection.c, 1.12,
1.13
cras at dovecot.org
cras at dovecot.org
Sun Aug 14 23:39:24 EEST 2005
- Previous message: [dovecot-cvs] dovecot/src/auth auth-worker-server.c,1.5,1.6
- Next message: [dovecot-cvs] dovecot/src/lib ioloop-internal.h, 1.14,
1.15 ioloop-notify-dn.c, 1.6, 1.7 ioloop-notify-inotify.c, 1.4,
1.5 ioloop-notify-none.c, 1.3, 1.4 ioloop.c, 1.27,
1.28 ioloop.h, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-auth
In directory talvi:/tmp/cvs-serv13831/lib-auth
Modified Files:
auth-server-connection.c
Log Message:
If UNIX socket connection fails with EAGAIN, try again for a while.
Index: auth-server-connection.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-auth/auth-server-connection.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- auth-server-connection.c 15 Dec 2004 17:52:17 -0000 1.12
+++ auth-server-connection.c 14 Aug 2005 20:39:22 -0000 1.13
@@ -192,9 +192,17 @@
struct auth_server_connection *conn;
const char *handshake;
pool_t pool;
- int fd;
+ int fd, try;
- fd = net_connect_unix(path);
+ /* max. 1 second wait here. */
+ for (try = 0; try < 10; try++) {
+ fd = net_connect_unix(path);
+ if (fd != -1 || errno != EAGAIN)
+ break;
+
+ /* busy. wait for a while. */
+ usleep(((rand() % 10) + 1) * 10000);
+ }
if (fd == -1) {
i_error("Can't connect to auth server at %s: %m", path);
return NULL;
- Previous message: [dovecot-cvs] dovecot/src/auth auth-worker-server.c,1.5,1.6
- Next message: [dovecot-cvs] dovecot/src/lib ioloop-internal.h, 1.14,
1.15 ioloop-notify-dn.c, 1.6, 1.7 ioloop-notify-inotify.c, 1.4,
1.5 ioloop-notify-none.c, 1.3, 1.4 ioloop.c, 1.27,
1.28 ioloop.h, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list