mirror of
https://github.com/matrix-construct/construct
synced 2024-09-28 19:58:53 +02:00
ircd::net: Add SSL_has_pending() to diagnostic for >= 1.1.x
This commit is contained in:
parent
98a5a09c92
commit
e22baa8dde
1 changed files with 12 additions and 2 deletions
14
ircd/net.cc
14
ircd/net.cc
|
@ -3481,16 +3481,26 @@ noexcept try
|
||||||
ec = error_code{asio::error::eof, asio::error::get_misc_category()};
|
ec = error_code{asio::error::eof, asio::error::get_misc_category()};
|
||||||
|
|
||||||
#ifdef IRCD_DEBUG_NET_SOCKET_READY
|
#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];
|
thread_local char ecbuf[64];
|
||||||
log::debug
|
log::debug
|
||||||
{
|
{
|
||||||
log, "%s ready %s %s avail:%zu:%zu:%d",
|
log, "%s ready %s %s avail:%zu:%zu:%d:%d",
|
||||||
loghead(*this),
|
loghead(*this),
|
||||||
reflect(type),
|
reflect(type),
|
||||||
string(ecbuf, ec),
|
string(ecbuf, ec),
|
||||||
type == ready::READ? bytes : 0UL,
|
type == ready::READ? bytes : 0UL,
|
||||||
type == ready::READ? available(*this) : 0UL,
|
type == ready::READ? available(*this) : 0UL,
|
||||||
SSL_pending(ssl.native_handle())
|
has_pending,
|
||||||
|
SSL_pending(ssl.native_handle()),
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue