diff --git a/src/web/AmsWebServer.cpp b/src/web/AmsWebServer.cpp index fc81b161..6cfc75c9 100644 --- a/src/web/AmsWebServer.cpp +++ b/src/web/AmsWebServer.cpp @@ -200,7 +200,7 @@ void AmsWebServer::temperatureJson() { return; int count = hw->getTempSensorCount(); - int size = 32 + (count * 72); + int size = 16 + (count * 72); char buf[size]; snprintf(buf, 16, "{\"c\":%d,\"s\":[", count); diff --git a/web/application.js b/web/application.js index 1e1af3c2..12d713cc 100644 --- a/web/application.js +++ b/web/application.js @@ -345,7 +345,10 @@ var fetch = function() { $('.jt').html("N/A"); } setTimeout(fetch, interval); - }).fail(function() { + }).fail(function(x, text, error) { + console.log("Failed request"); + console.log(text); + console.log(error); setTimeout(fetch, interval*4); setStatus("mqtt", 0);