Added
Fixed improve HTTP client configuration and clear update documents after API calls (Manuel Weiser) 6cc4efc - Fixes memory leak in HTTPClient by disabling connection reuse (Jan Philipp Ecker) update reload logic after removing and saving Bambu credentials for better cache handling (Manuel Weiser) Changed docs: update changelog and header for version v1.4.8 (Manuel Weiser) docs: update platformio.ini for version v1.4.8 (Manuel Weiser) Merge pull request #30 from janecker/main (ManuelW) Merge branch 'testing' into main (ManuelW)
This commit is contained in:
+6
-6
@@ -70,9 +70,9 @@
|
|||||||
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials removed!';
|
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials removed!';
|
||||||
// Reload with forced cache refresh after short delay
|
// Reload with forced cache refresh after short delay
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.replace('/');
|
window.location.reload(true);
|
||||||
location.reload(true);
|
window.location.href = '/';
|
||||||
}, 1500);
|
}, 1500);
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('bambuStatusMessage').innerText = 'Error while removing Bambu Credentials.';
|
document.getElementById('bambuStatusMessage').innerText = 'Error while removing Bambu Credentials.';
|
||||||
}
|
}
|
||||||
@@ -116,9 +116,9 @@
|
|||||||
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials saved!';
|
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials saved!';
|
||||||
// Reload with forced cache refresh after short delay
|
// Reload with forced cache refresh after short delay
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.replace('/');
|
window.location.reload(true);
|
||||||
location.reload(true);
|
window.location.href = '/';
|
||||||
}, 1500);
|
}, 1500);
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('bambuStatusMessage').innerText = 'Error while saving Bambu Credentials.';
|
document.getElementById('bambuStatusMessage').innerText = 'Error while saving Bambu Credentials.';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ void sendToApi(void *parameter) {
|
|||||||
String octoToken = params->octoToken;
|
String octoToken = params->octoToken;
|
||||||
|
|
||||||
HTTPClient http;
|
HTTPClient http;
|
||||||
|
http.setReuse(false);
|
||||||
http.begin(spoolsUrl);
|
http.begin(spoolsUrl);
|
||||||
http.addHeader("Content-Type", "application/json");
|
http.addHeader("Content-Type", "application/json");
|
||||||
if (octoEnabled && octoToken != "") http.addHeader("X-Api-Key", octoToken);
|
if (octoEnabled && octoToken != "") http.addHeader("X-Api-Key", octoToken);
|
||||||
@@ -111,6 +112,7 @@ void sendToApi(void *parameter) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
http.end();
|
http.end();
|
||||||
|
vTaskDelay(50 / portTICK_PERIOD_MS);
|
||||||
|
|
||||||
// Speicher freigeben
|
// Speicher freigeben
|
||||||
delete params;
|
delete params;
|
||||||
@@ -164,6 +166,7 @@ bool updateSpoolTagId(String uidString, const char* payload) {
|
|||||||
0, // Priorität
|
0, // Priorität
|
||||||
NULL // Task-Handle (nicht benötigt)
|
NULL // Task-Handle (nicht benötigt)
|
||||||
);
|
);
|
||||||
|
updateDoc.clear();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -200,6 +203,7 @@ uint8_t updateSpoolWeight(String spoolId, uint16_t weight) {
|
|||||||
0, // Priorität
|
0, // Priorität
|
||||||
NULL // Task-Handle (nicht benötigt)
|
NULL // Task-Handle (nicht benötigt)
|
||||||
);
|
);
|
||||||
|
updateDoc.clear();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -237,6 +241,7 @@ bool updateSpoolOcto(int spoolId) {
|
|||||||
0, // Priorität
|
0, // Priorität
|
||||||
NULL // Task-Handle (nicht benötigt)
|
NULL // Task-Handle (nicht benötigt)
|
||||||
);
|
);
|
||||||
|
updateDoc.clear();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user