On Windows, WSAENOTSOCK is treated the same as EBADF. This is needed because of a race condition (sock is selected just after another thread closes it), which needs a proper fix.

This commit is contained in:
Mark Valence 1999-12-09 22:05:00 +00:00
parent 354d0d5b50
commit 31eea5f43c

View File

@ -569,8 +569,13 @@ slapd_daemon_task(
case -1: { /* failure - try again */
int err = sock_errno();
if( err == EBADF && ++ebadf < SLAPD_EBADF_LIMIT) {
continue;
if( err == EBADF
#ifdef HAVE_WINSOCK
|| err == WSAENOTSOCK /* you'd think this would be EBADF */
#endif
) {
if (++ebadf < SLAPD_EBADF_LIMIT)
continue;
}
if( err != EINTR ) {