From: Kurt Zeilenga Date: Fri, 28 Jan 2005 19:03:15 +0000 (+0000) Subject: ITS#3524 (partial): reinit FDSETs X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~228 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=96854698cde74c24b694e255e9adbc58f53ea39f;p=openldap ITS#3524 (partial): reinit FDSETs --- diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index dad33ed000..ae5225ca00 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -291,15 +291,16 @@ ldap_pvt_connect(LDAP *ld, ber_socket_t s, return rc; } #endif - FD_ZERO(&wfds); - FD_SET(s, &wfds ); + + do { + FD_ZERO(&wfds); + FD_SET(s, &wfds ); #ifdef HAVE_WINSOCK - FD_ZERO(&efds); - FD_SET(s, &efds ); + FD_ZERO(&efds); + FD_SET(s, &efds ); #endif - do { rc = select(ldap_int_tblsize, z, &wfds, #ifdef HAVE_WINSOCK &efds,