]> git.sur5r.net Git - openldap/commitdiff
ITS#8725 Avoid listener thread startup race
authorHoward Chu <hyc@symas.com>
Thu, 9 Feb 2017 17:20:28 +0000 (17:20 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 8 Sep 2017 16:39:22 +0000 (17:39 +0100)
Typically only shows up under valgrind, not in regular runs

servers/slapd/daemon.c

index 6947df5f9ae6dcd2ea491b23ddc57ede1096c0af..f14a4160d7e19cc0197e0f4bc95bc1cc6b99cc62 100644 (file)
@@ -2421,6 +2421,7 @@ loop:
 
                        if ( lr->sl_sd == AC_SOCKET_INVALID ) continue;
                        if ( DAEMON_ID( lr->sl_sd ) != tid ) continue;
+                       if ( !SLAP_SOCK_IS_ACTIVE( tid, lr->sl_sd )) continue;
 
                        if ( lr->sl_mute || lr->sl_busy )
                        {