fix(SecureSocket): Reset does not close socket, it is closed in dtor. (#4415)

This commit is contained in:
Matej Kenda 2024-03-29 09:03:22 +01:00
parent 47a4db37e5
commit 8d3de8a5ed

View File

@ -54,6 +54,7 @@ SecureSocketImpl::~SecureSocketImpl()
{ {
try try
{ {
close();
reset(); reset();
} }
catch (...) catch (...)
@ -634,7 +635,6 @@ void SecureSocketImpl::setPeerHostName(const std::string& peerHostName)
void SecureSocketImpl::reset() void SecureSocketImpl::reset()
{ {
close();
if (_pSSL) if (_pSSL)
{ {
::SSL_set_ex_data(_pSSL, SSLManager::instance().socketIndex(), nullptr); ::SSL_set_ex_data(_pSSL, SSLManager::instance().socketIndex(), nullptr);