From e7d50d2614203921b2291da51a67498df225052d Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Wed, 8 Feb 2023 10:18:41 +0100 Subject: [PATCH] Bugfix. - respect net debug on/off state --- wled00/net_debug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/net_debug.cpp b/wled00/net_debug.cpp index 6bcbe1e2..4d9552a8 100644 --- a/wled00/net_debug.cpp +++ b/wled00/net_debug.cpp @@ -3,7 +3,7 @@ #ifdef WLED_DEBUG_HOST size_t NetworkDebugPrinter::write(uint8_t c) { - if (!WLED_CONNECTED) return 0; + if (!WLED_CONNECTED || !netDebugEnabled) return 0; if (!debugPrintHostIP && !debugPrintHostIP.fromString(netDebugPrintHost)) { #ifdef ESP8266 @@ -24,7 +24,7 @@ size_t NetworkDebugPrinter::write(uint8_t c) { } size_t NetworkDebugPrinter::write(const uint8_t *buf, size_t size) { - if (!WLED_CONNECTED || buf == nullptr) return 0; + if (!WLED_CONNECTED || buf == nullptr || !netDebugEnabled) return 0; if (!debugPrintHostIP && !debugPrintHostIP.fromString(netDebugPrintHost)) { #ifdef ESP8266