mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 19:19:35 -05: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
1 changed files with 7 additions and 2 deletions
|
|
@ -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 a new issue