(connection_acceptor): Don't increase the
authorWerner Koch <wk@gnupg.org>
Mon, 12 Jan 2004 07:54:06 +0000 (07:54 +0000)
committerWerner Koch <wk@gnupg.org>
Mon, 12 Jan 2004 07:54:06 +0000 (07:54 +0000)
error counter for EMFILE conditions.

ChangeLog
TODO
src/ftp_listener.c

index 43e2324..12f1fbc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-12  Werner Koch  <wk@gnupg.org>
+
+       * src/ftp_listener.c (connection_acceptor): Don't increase the
+       error counter for EMFILE conditions.
+
 2003-08-13  Werner Koch  <wk@gnupg.org>
 
        
 2003-08-13  Werner Koch  <wk@gnupg.org>
 
        
diff --git a/TODO b/TODO
index 4e29147..e817f8b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,6 @@
 $Id$
 
 $Id$
 
+
 User requested:
 
 - STOR
 User requested:
 
 - STOR
index 2227a76..b07b0db 100644 (file)
@@ -431,7 +431,13 @@ static void *connection_acceptor(ftp_listener_t *f)
                  syslog(LOG_WARNING, 
                      "error accepting FTP connection; %s", 
                      strerror(errno));
                  syslog(LOG_WARNING, 
                      "error accepting FTP connection; %s", 
                      strerror(errno));
-                 ++num_error;
+                 /* We don't bump the error counter if we are merely
+                    out of file descriptors.  The hope is that some
+                    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)
+                     ++num_error;
              }
              if (num_error >= MAX_ACCEPT_ERROR) {
                  syslog(LOG_ERR, 
              }
              if (num_error >= MAX_ACCEPT_ERROR) {
                  syslog(LOG_ERR,