From: Howard Chu Date: Mon, 17 Oct 2005 17:31:48 +0000 (+0000) Subject: Fix epoll, slapd_remove gets called multiple times for the same descriptor. X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~216 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=656c6011bbcc6373c79a9a3bcbc6011a84769dda;p=openldap Fix epoll, slapd_remove gets called multiple times for the same descriptor. Ignore subsequent calls. --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 6f796b493c..ed6078081b 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -194,6 +194,7 @@ static struct slap_daemon { # define SLAP_DEL_SOCK(s) do { \ int fd, rc, index = SLAP_SOCK_IX((s)); \ + if ( index < 0 ) break; \ rc = epoll_ctl(slap_daemon.sd_epfd, EPOLL_CTL_DEL, \ (s), &SLAP_SOCK_EP((s))); \ slap_daemon.sd_epolls[index] = \