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:
@@ -94,6 +94,7 @@ void sendToApi(void *parameter) {
|
||||
String octoToken = params->octoToken;
|
||||
|
||||
HTTPClient http;
|
||||
http.setReuse(false);
|
||||
http.begin(spoolsUrl);
|
||||
http.addHeader("Content-Type", "application/json");
|
||||
if (octoEnabled && octoToken != "") http.addHeader("X-Api-Key", octoToken);
|
||||
@@ -111,6 +112,7 @@ void sendToApi(void *parameter) {
|
||||
}
|
||||
|
||||
http.end();
|
||||
vTaskDelay(50 / portTICK_PERIOD_MS);
|
||||
|
||||
// Speicher freigeben
|
||||
delete params;
|
||||
@@ -164,6 +166,7 @@ bool updateSpoolTagId(String uidString, const char* payload) {
|
||||
0, // Priorität
|
||||
NULL // Task-Handle (nicht benötigt)
|
||||
);
|
||||
updateDoc.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -200,6 +203,7 @@ uint8_t updateSpoolWeight(String spoolId, uint16_t weight) {
|
||||
0, // Priorität
|
||||
NULL // Task-Handle (nicht benötigt)
|
||||
);
|
||||
updateDoc.clear();
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -237,6 +241,7 @@ bool updateSpoolOcto(int spoolId) {
|
||||
0, // Priorität
|
||||
NULL // Task-Handle (nicht benötigt)
|
||||
);
|
||||
updateDoc.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user