From f733b85957089fd67c2c7284cbae0287dbefb944 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sat, 10 Apr 2021 16:21:09 +0200 Subject: [PATCH] LibTLS: Remove excessive CloseNotify logging --- Userland/Libraries/LibTLS/Record.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibTLS/Record.cpp b/Userland/Libraries/LibTLS/Record.cpp index bc9894a2ae..e1c98eaf48 100644 --- a/Userland/Libraries/LibTLS/Record.cpp +++ b/Userland/Libraries/LibTLS/Record.cpp @@ -417,16 +417,16 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer) auto level = plain[0]; auto code = plain[1]; + dbgln_if(TLS_DEBUG, "Alert received with level {}, code {}", level, code); + if (level == (u8)AlertLevel::Critical) { dbgln("We were alerted of a critical error: {} ({})", code, alert_name((AlertDescription)code)); m_context.critical_error = code; try_disambiguate_error(); res = (i8)Error::UnknownError; - } else { - dbgln("Alert: {}", code); } - if (code == 0) { - // close notify + + if (code == (u8)AlertDescription::CloseNotify) { res += 2; alert(AlertLevel::Critical, AlertDescription::CloseNotify); m_context.connection_finished = true;