Sam~

Would you consider a modification like this for cdfilters.C so that it will try several times to connect to a socket which has reached its queue limit?

--- courier-0.42.2/courier/cdfilters.C.orig     2003-08-10 09:53:27.000000000 -0700
+++ courier-0.42.2/courier/cdfilters.C  2003-08-10 10:03:54.000000000 -0700
@@ -9,6 +9,9 @@
 #if    HAVE_FCNTL_H
 #include       <fcntl.h>
 #endif
+#if HAVE_UNISTD_H
+#include       <unistd.h>
+#endif
 #include       <errno.h>
 #include       <ctype.h>
 #include       "mydirent.h"
@@ -97,6 +100,14 @@
        struct  timeval tv;
        fd_set  fds;
 
+       int triedagain=0;
+               while (errno == EAGAIN && triedagain < 5)
+               {
+                       triedagain++;
+                       sleep(1);
+                       connect(s, (struct sockaddr *)&ssun, sizeof(ssun));
+               }
+
                if (errno != EINPROGRESS)
                {
                        clog_msg_prerrno();

Reply via email to