summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibTLS/Record.cpp
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2021-04-10 16:21:09 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-10 21:05:00 +0200
commitf733b85957089fd67c2c7284cbae0287dbefb944 (patch)
tree4c65c1f066d43bb51ca2e33599dbebba033128cb /Userland/Libraries/LibTLS/Record.cpp
parenta6e448208052c2d03fca53a4061a367b33167d37 (diff)
downloadserenity-f733b85957089fd67c2c7284cbae0287dbefb944.zip
LibTLS: Remove excessive CloseNotify logging
Diffstat (limited to 'Userland/Libraries/LibTLS/Record.cpp')
-rw-r--r--Userland/Libraries/LibTLS/Record.cpp8
1 files 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;