1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibTLS: Mark the connection as finished and disconnected on TLS error

This commit is contained in:
Ali Mohammad Pur 2021-09-28 11:29:27 +03:30 committed by Andreas Kling
parent f0e2c517fc
commit 3d24850db5

View file

@ -226,6 +226,9 @@ bool TLSv12::check_connection_state(bool read)
m_context.has_invoked_finish_or_error_callback = true;
if (on_tls_error)
on_tls_error((AlertDescription)m_context.critical_error);
m_context.connection_finished = true;
m_context.connection_status = ConnectionStatus::Disconnected;
Core::Socket::close();
return false;
}
if (((read && m_context.application_buffer.size() == 0) || !read) && m_context.connection_finished) {