]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/daemon.c
fix ITS#5959 fix
[openldap] / servers / slapd / daemon.c
index ddea122b54e91695d1facab2863d2e451844f026..fe87e196a4629a031e221c75bf981834214175eb 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 );
+                                       }
                                }
                        }
                }