mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
* fix http response for status with retain * take 2 * add a failsafe when JSONlen reach zero
This commit is contained in:
parent
fc92dc0995
commit
6aed929e17
@ -3064,7 +3064,8 @@ void HandleHttpCommand(void)
|
||||
if (JSON) { // Is it a JSON message (and not only [15:26:08 MQT: stat/wemos5/POWER = O])
|
||||
if (cflg) { WSContentSend_P(PSTR(",")); }
|
||||
uint32_t JSONlen = len - (JSON - line) -3;
|
||||
WSContentSend(JSON +1, JSONlen);
|
||||
for( ++JSON ; JSONlen && JSON[JSONlen] != '}' ; JSONlen-- );
|
||||
WSContentSend(JSON, JSONlen);
|
||||
cflg = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user