diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-06-28 16:10:59 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-28 16:35:04 +0200 |
commit | 2a7cb4fe4234c2ed72de73102655d2c766dd4ab2 (patch) | |
tree | e91a149408ded45af9e21365f4b7bddb0eec7d14 /Userland/Libraries/LibTLS/Socket.cpp | |
parent | cef2f55a8b9b59175ff5debc95596a867f265c42 (diff) | |
download | serenity-2a7cb4fe4234c2ed72de73102655d2c766dd4ab2.zip |
LibTLS: Ensure that on_tls_finished is called only once
Connection state changes when the logical transport is closed should
not trigger tls_finished.
Diffstat (limited to 'Userland/Libraries/LibTLS/Socket.cpp')
-rw-r--r-- | Userland/Libraries/LibTLS/Socket.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibTLS/Socket.cpp b/Userland/Libraries/LibTLS/Socket.cpp index 92c7afe1e4..2bbb789b69 100644 --- a/Userland/Libraries/LibTLS/Socket.cpp +++ b/Userland/Libraries/LibTLS/Socket.cpp @@ -195,7 +195,7 @@ bool TLSv12::check_connection_state(bool read) return false; } if (((read && m_context.application_buffer.size() == 0) || !read) && m_context.connection_finished) { - if (m_context.application_buffer.size() == 0) { + if (m_context.application_buffer.size() == 0 && m_context.connection_status != ConnectionStatus::Disconnected) { if (on_tls_finished) on_tls_finished(); } |