0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-25 21:38:18 +02:00

ircd::net: Add SSL_has_pending() to diagnostic for >= 1.1.x

This commit is contained in:
Jason Volk 2019-09-09 14:59:22 -07:00
parent 98a5a09c92
commit e22baa8dde

View file

@ -3481,16 +3481,26 @@ noexcept try
ec = error_code{asio::error::eof, asio::error::get_misc_category()};
#ifdef IRCD_DEBUG_NET_SOCKET_READY
const auto has_pending
{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
SSL_has_pending(ssl.native_handle())
#else
0
#endif
};
thread_local char ecbuf[64];
log::debug
{
log, "%s ready %s %s avail:%zu:%zu:%d",
log, "%s ready %s %s avail:%zu:%zu:%d:%d",
loghead(*this),
reflect(type),
string(ecbuf, ec),
type == ready::READ? bytes : 0UL,
type == ready::READ? available(*this) : 0UL,
SSL_pending(ssl.native_handle())
has_pending,
SSL_pending(ssl.native_handle()),
};
#endif