mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
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:
parent
354d0d5b50
commit
31eea5f43c
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user