ITS#10451 Unregister event before we close socket

We don't need the event anymore so let's make everyone's life easier by
not letting the library see different events on different sockets doing
different things on the same fd number. epoll/kqueue don't like it and
this could be a libevent bug somewhere in handling that refusal.
This commit is contained in:
Ondřej Kuzník 2026-02-06 09:37:20 +00:00 committed by Quanah Gibson-Mount
parent 6566527af6
commit 1770eab8b8

View file

@ -72,6 +72,7 @@ done:
LDAP_LIST_REMOVE( conn, next );
if ( rc ) {
event_del( conn->event );
evutil_closesocket( conn->fd );
b->b_opening--;
b->b_failed++;