From c2147e9b8e215cf567bbf0aee66e79619220ede6 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Tue, 17 Dec 2024 17:46:23 +0100 Subject: [PATCH] Switch log ordering --- src/WebRequest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WebRequest.cpp b/src/WebRequest.cpp index a563536..3dd885d 100644 --- a/src/WebRequest.cpp +++ b/src/WebRequest.cpp @@ -70,11 +70,11 @@ void AsyncWebServerRequest::_onData(void* buf, size_t len) { // SSL/TLS handshake detection #ifndef ASYNC_TCP_SSL_ENABLED if (_parseState == PARSE_REQ_START && len && ((uint8_t*)buf)[0] == 0x16) { // 0x16 indicates a Handshake message (SSL/TLS). - _parseState = PARSE_REQ_FAIL; - _client->close(); #ifdef ESP32 log_d("SSL/TLS handshake detected: closing connection"); #endif + _parseState = PARSE_REQ_FAIL; + _client->close(); return; } #endif