LibTLS: Close the underlying socket on EOF

There's no reason to keep waiting when there's nothing else to come.
This makes RequestServer not spin on Core::Socket::read() (in some
scenarios).
This commit is contained in:
Ali Mohammad Pur 2021-09-16 00:26:03 +04:30 committed by Andreas Kling
commit 23febbed41
Notes: sideshowbarker 2024-07-18 03:54:49 +09:00
2 changed files with 21 additions and 13 deletions

View file

@ -412,6 +412,7 @@ private:
void read_from_socket();
bool check_connection_state(bool read);
void notify_client_for_app_data();
ssize_t handle_server_hello(ReadonlyBytes, WritePacketStage&);
ssize_t handle_handshake_finished(ReadonlyBytes, WritePacketStage&);
@ -515,6 +516,7 @@ private:
CipherVariant m_cipher_remote { Empty {} };
bool m_has_scheduled_write_flush { false };
bool m_has_scheduled_app_data_flush { false };
i32 m_max_wait_time_for_handshake_in_seconds { 10 };
RefPtr<Core::Timer> m_handshake_timeout_timer;