LibTLS: Change connection state to disconnected after server CloseNotify

Prior to this commit LibTLS closed the connection but did not consider
it terminated after receiving and acknowledging a CloseNotify from the
server, which led to hangs in DoT (and possibly other users).
This commit is contained in:
Ali Mohammad Pur 2024-11-24 21:59:31 +01:00 committed by Ali Mohammad Pur
parent 7b389ca221
commit e5ff572d73
Notes: github-actions[bot] 2024-11-24 21:34:48 +00:00

View file

@ -280,6 +280,7 @@ bool TLSv12::check_connection_state(bool read)
if (on_tls_finished)
on_tls_finished();
}
m_context.connection_status = ConnectionStatus::Disconnected;
if (m_context.tls_buffer.size()) {
dbgln_if(TLS_DEBUG, "connection closed without finishing data transfer, {} bytes still in buffer and {} bytes in application buffer",
m_context.tls_buffer.size(),