From e5ff572d732ecb6aa8524321692d997f00ea75f4 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Sun, 24 Nov 2024 21:59:31 +0100 Subject: [PATCH] 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). --- Libraries/LibTLS/Socket.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibTLS/Socket.cpp b/Libraries/LibTLS/Socket.cpp index e7f8b5dee74..55d66a5b40e 100644 --- a/Libraries/LibTLS/Socket.cpp +++ b/Libraries/LibTLS/Socket.cpp @@ -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(),