From 25f13e434f2070b14a4fec76863a37d9268623a0 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 24 Nov 2024 16:07:36 +0100 Subject: [PATCH] TasmotaClient discard GET_JSON timeout --- tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino b/tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino index 345fc9dba..ef0a5b4d3 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_31_tasmota_client.ino @@ -444,8 +444,10 @@ void TasmotaClient_Show(void) { char buffer[250]; // Keep size below 255 to stay within 8-bits index and len uint8_t len = TasmotaClient_receiveData(buffer, sizeof(buffer) -1); - buffer[len] = '\0'; - ResponseAppend_P(PSTR(",\"TasmotaClient\":%s"), buffer); + if (len) { + buffer[len] = '\0'; + ResponseAppend_P(PSTR(",\"TasmotaClient\":%s"), buffer); + } } }