mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibTLS: Avoid busy-wait between ClientHello and ServerHello
This commit also adds a timeout timer to cancel the connection if the server does not respond to the hello request in 10 seconds.
This commit is contained in:
parent
e5e8e8ab96
commit
d54d2892a9
5 changed files with 52 additions and 15 deletions
|
@ -311,9 +311,7 @@ ssize_t TLSv12::handle_message(const ByteBuffer& buffer)
|
|||
if (code == 0) {
|
||||
// close notify
|
||||
res += 2;
|
||||
auto closure_alert = build_alert(true, (u8)AlertDescription::CloseNotify);
|
||||
write_packet(closure_alert);
|
||||
flush();
|
||||
alert(AlertLevel::Critical, AlertDescription::CloseNotify);
|
||||
m_context.connection_finished = true;
|
||||
}
|
||||
m_context.error_code = (Error)code;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue