Add sync error when failing to parse head commit (#2354)

This commit is contained in:
feiniks 2020-07-09 18:37:59 +08:00 committed by GitHub
parent 588ca2530c
commit 93f80b0b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1409,8 +1409,10 @@ check_head_commit_thread (void *vdata)
}
if (status == HTTP_OK) {
if (parse_head_commit_info (rsp_content, rsp_size, data) < 0)
if (parse_head_commit_info (rsp_content, rsp_size, data) < 0) {
data->error_code = SYNC_ERROR_ID_NETWORK;
goto out;
}
data->success = TRUE;
} else if (status == HTTP_REPO_DELETED) {
data->is_deleted = TRUE;