Skip to content

Commit

Permalink
fix: restful api return code error if not start taosd (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Jun 16, 2023
1 parent df524bf commit f2827d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/benchUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,8 @@ int postProceSql(char *sqlstr, char* dbName, int precision, int iface,
tcp, sockfd, filePath, responseBuf,
response_length);
if (NULL != strstr(responseBuf, resHttpOk) && iface == REST_IFACE) {
if (3 <= g_arguments->rest_server_ver_major) {
// if taosd is not starting , rest_server_ver_major can't be got by 'select server_version()' , so is -1
if (-1 == g_arguments->rest_server_ver_major || 3 <= g_arguments->rest_server_ver_major) {
code = getCodeFromResp(responseBuf);
} else {
code = 0;
Expand Down

0 comments on commit f2827d6

Please sign in to comment.