mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
don't close invalid sockets (blind fix to ITS#5606)
This commit is contained in:
parent
9c5b22ceda
commit
65cfb058cb
1 changed files with 13 additions and 3 deletions
|
|
@ -79,7 +79,11 @@ Listener **slap_listeners = NULL;
|
||||||
#define SLAPD_LISTEN_BACKLOG 1024
|
#define SLAPD_LISTEN_BACKLOG 1024
|
||||||
#endif /* ! SLAPD_LISTEN_BACKLOG */
|
#endif /* ! SLAPD_LISTEN_BACKLOG */
|
||||||
|
|
||||||
static ber_socket_t wake_sds[2];
|
static ber_socket_t wake_sds[2]
|
||||||
|
#ifdef HAVE_WINSOCK
|
||||||
|
= { INVALID_SOCKET, INVALID_SOCKET }
|
||||||
|
#endif /* HAVE_WINSOCK */
|
||||||
|
;
|
||||||
static int emfile;
|
static int emfile;
|
||||||
|
|
||||||
static volatile int waking;
|
static volatile int waking;
|
||||||
|
|
@ -1641,7 +1645,13 @@ int
|
||||||
slapd_daemon_destroy( void )
|
slapd_daemon_destroy( void )
|
||||||
{
|
{
|
||||||
connections_destroy();
|
connections_destroy();
|
||||||
|
#ifdef HAVE_WINSOCK
|
||||||
|
if ( wake_sds[1] != INVALID_SOCKET )
|
||||||
|
#endif /* HAVE_WINSOCK */
|
||||||
tcp_close( SLAP_FD2SOCK(wake_sds[1]) );
|
tcp_close( SLAP_FD2SOCK(wake_sds[1]) );
|
||||||
|
#ifdef HAVE_WINSOCK
|
||||||
|
if ( wake_sds[0] != INVALID_SOCKET )
|
||||||
|
#endif /* HAVE_WINSOCK */
|
||||||
tcp_close( SLAP_FD2SOCK(wake_sds[0]) );
|
tcp_close( SLAP_FD2SOCK(wake_sds[0]) );
|
||||||
sockdestroy();
|
sockdestroy();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue