Closed lzw7603 closed 5 years ago
Hi, I have a possible similar behavior with last version of HTTPClient.
My code use a InfluxDB Library, the implementation there is:
bool InfluxArduino::write(const char *measurement,const char *tagString,const char *fieldString)
{
HTTPClient http;
char uri[32];
sprintf(uri, "/write?db=%s", _database);
if(_isSecure)
{
http.begin(_host, _port, uri, _cert);
}
else
{
http.begin(_host, _port, uri);
}
http.addHeader("Content-Type", "text/plain"); // not sure what influx is looking for but this works?
if(_isAuthorised)
{
http.setAuthorization(_username,_password);
}
char writeBuf[512]; // ¯\_(ツ)_/¯
if(strlen(tagString) > 0)
{
sprintf(writeBuf,"%s,%s %s",measurement,tagString,fieldString); //no comma between tags and fields
}
else
{
//no tags
sprintf(writeBuf,"%s %s",measurement,fieldString); //no comma between tags and fields
}
if(debug) Serial.println(writeBuf);
_latestResponse = http.POST(writeBuf);
http.end();
return _latestResponse == 204;
}
after some hours, this enter to a internal loop on HTTPClient and it stays there, because other functions in my code works, like Bluetooth callbacks and Bluetooth advertising
I have the next frameworks versions in my platformio installation:
"framework-arduinoespressif32": {
"type": "framework",
"optional": true,
"version": "~2.10002.190416"
},
"framework-espidf": {
"type": "framework",
"optional": true,
"version": "~3.30200.190418"
}
and espressif32 Version: 1.8.0
My project libraries:
Updating Adafruit AM2320 sensor library @ 1.1.1 [Up-to-date]
Updating Adafruit BME680 Library @ 1.0.7 [Up-to-date]
Updating Adafruit Unified Sensor @ 1.0.3 [Up-to-date]
Updating ArduinoJson @ 6.10.1 [Up-to-date]
Updating ClosedCube BME680 @ 1.2.0 [Up-to-date]
Updating HPMA115S0 Arduino Library @ 23cbd44 [Up-to-date]
Updating Influx-Arduino @ ce16fc3 [Up-to-date]
Updating U8g2 @ 2.26.5 [Up-to-date]
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This stale issue has been automatically closed. Thank you for your contributions.
Hardware:
Board: ESP32 Dev Module Core Installation/update date: 9/9/2018 IDE name: Arduino IDE Flash Frequency: 80Mhz Upload Speed: 921600
Description:
Sketch:
First time, i found that is block on line 688 in file HTTPClient.cpp
And then I found that is block on line 668 in file HTTPClient.cpp
And then I found that is block on line 235 in file HTTPClient.cpp
And then I found that is block on line 425 in file WiFiClient.cpp
java code on server