0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-19 00:10:59 +01:00

ircd::net: Bypass call to current_cipher() on error conditions.

This commit is contained in:
Jason Volk 2019-04-16 19:37:42 -07:00
parent a24d3a1d96
commit 6bf3ccb7b5

View file

@ -1762,9 +1762,11 @@ noexcept try
assert(bool(sock)); assert(bool(sock));
#ifdef RB_DEBUG #ifdef RB_DEBUG
const auto &current_cipher const auto *const current_cipher
{ {
openssl::current_cipher(*sock) !ec?
openssl::current_cipher(*sock):
nullptr
}; };
thread_local char ecbuf[64]; thread_local char ecbuf[64];
@ -3222,9 +3224,11 @@ noexcept try
ec = make_error_code(errc::timed_out); ec = make_error_code(errc::timed_out);
#ifdef RB_DEBUG #ifdef RB_DEBUG
const auto &current_cipher const auto *const current_cipher
{ {
openssl::current_cipher(*this) !ec?
openssl::current_cipher(*this):
nullptr
}; };
thread_local char ecbuf[64]; thread_local char ecbuf[64];