(connection_acceptor): Don't increase the
authorWerner Koch <wk@gnupg.org>
Mon, 12 Jan 2004 08:05:31 +0000 (08:05 +0000)
committerWerner Koch <wk@gnupg.org>
Mon, 12 Jan 2004 08:05:31 +0000 (08:05 +0000)
error counter for EMFILE conditions but a few seconds.

ChangeLog
src/ftp_listener.c

index 12f1fbc..e65ab63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 2004-01-12  Werner Koch  <wk@gnupg.org>
 
        * src/ftp_listener.c (connection_acceptor): Don't increase the
-       error counter for EMFILE conditions.
+       error counter for EMFILE conditions but a few seconds.
 
 2003-08-13  Werner Koch  <wk@gnupg.org>
 
index b07b0db..6a9d830 100644 (file)
@@ -436,7 +436,15 @@ static void *connection_acceptor(ftp_listener_t *f)
                     other thread will eventually finish and release
                     its resources.  We have this problem ever few week
                     on the ftp.gnupg.org site. */
-                 if (errno != EMFILE)
+                 if (errno == EMFILE) {
+                     /* Wait a bit. */
+                     struct timeval tv;
+
+                     tv.tv_sec = 10;
+                     tv.tv_usec = 0;
+                     select(0, NULL, NULL, NULL, &tv);
+                 }
+                 else
                      ++num_error;
              }
              if (num_error >= MAX_ACCEPT_ERROR) {