]> git.sur5r.net Git - openldap/commitdiff
Ignore hangups on removed sockets
authorHoward Chu <hyc@openldap.org>
Thu, 12 Feb 2009 17:05:00 +0000 (17:05 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 12 Feb 2009 17:05:00 +0000 (17:05 +0000)
servers/slapd/daemon.c

index ddea122b54e91695d1facab2863d2e451844f026..90c85ec21bcd2c4163217889529e76c0c5bd76f2 100644 (file)
@@ -2545,12 +2545,14 @@ slapd_daemon_task(
                                } else if ( !w ) {
                                        Debug( LDAP_DEBUG_CONNS,
                                                "daemon: hangup on %d\n", fd, 0, 0 );
+                                       if (SLAP_SOCK_IS_ACTIVE( fd ) {
 #ifdef HAVE_EPOLL
-                                       /* Don't keep reporting the hangup
-                                        */
-                                       SLAP_EPOLL_SOCK_SET( fd, EPOLLET );
+                                               /* Don't keep reporting the hangup
+                                                */
+                                               SLAP_EPOLL_SOCK_SET( fd, EPOLLET );
 #endif
-                                       connection_hangup( fd );
+                                               connection_hangup( fd );
+                                       }
                                }
                        }
                }