This commit is contained in:
simon 2020-02-15 19:33:18 -05:00
parent e1aaaee617
commit 849beb09d8

View File

@ -138,6 +138,7 @@ void elastic_flush() {
LOG_INFOF("elastic.c", "Indexed %d documents (%zukB) <%d>", count, buf_cur / 1024, r->status_code);
if (r->status_code != 200 && r->status_code != 413) {
cJSON *ret_json = cJSON_Parse(r->body);
if (cJSON_GetObjectItem(ret_json, "errors")->valueint != 0) {
cJSON *err;
@ -151,6 +152,7 @@ void elastic_flush() {
}
cJSON_Delete(ret_json);
}
free_response(r);
free(buf);