Skip to content
Snippets Groups Projects
Commit 31eea5f4 authored by Mark Valence's avatar Mark Valence
Browse files

On Windows, WSAENOTSOCK is treated the same as EBADF. This is needed because...

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.
parent 354d0d5b
No related branches found
No related tags found
No related merge requests found
......@@ -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 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment