mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-19 23:45:28 +02:00
http_client: disconnect event to read last occurred error in esp-tls
This commit is contained in:
@@ -1145,7 +1145,7 @@ int esp_http_client_write(esp_http_client_handle_t client, const char *buffer, i
|
||||
esp_err_t esp_http_client_close(esp_http_client_handle_t client)
|
||||
{
|
||||
if (client->state >= HTTP_STATE_INIT) {
|
||||
http_dispatch_event(client, HTTP_EVENT_DISCONNECTED, NULL, 0);
|
||||
http_dispatch_event(client, HTTP_EVENT_DISCONNECTED, esp_transport_get_error_handle(client->transport), 0);
|
||||
client->state = HTTP_STATE_INIT;
|
||||
return esp_transport_close(client->transport);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user