Skip to content
Snippets Groups Projects
Commit 4f499755 authored by Ondřej Kuzník's avatar Ondřej Kuzník Committed by Quanah Gibson-Mount
Browse files

ITS#8747 Avoid epoch recursion in connection_write_cb

parent 2c1bb42f
No related branches found
No related tags found
1 merge request!326Load balancer related changes/fixes
......@@ -322,7 +322,10 @@ connection_write_cb( evutil_socket_t s, short what, void *arg )
return;
}
epoch = epoch_join();
/* If what == 0, we have a caller as opposed to being a callback */
if ( what ) {
epoch = epoch_join();
}
checked_lock( &c->c_io_mutex );
Debug( LDAP_DEBUG_CONNS, "connection_write_cb: "
......@@ -369,7 +372,9 @@ connection_write_cb( evutil_socket_t s, short what, void *arg )
done:
RELEASE_REF( c, c_refcnt, c->c_destroy );
epoch_leave( epoch );
if ( what ) {
epoch_leave( epoch );
}
}
void
......
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