Merge pull request #5306 from taosdata/hotfix/sangshuduo/TD-3117-fix-taosdemo-cntdelay-coredump

[TD-3117] <fix>: fix taosdemo coredump led by cntDelay.
This commit is contained in:
Shuduo Sang 2021-03-01 18:44:31 +08:00 committed by GitHub
commit 5c7a10f4cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4271,7 +4271,7 @@ void startMultiThreadInsertData(int threads, char* db_name, char* precision, SSu
}
cntDelay -= 1;
assert(cntDelay != 0);
if (cntDelay == 0) cntDelay = 1;
avgDelay = (double)totalDelay / cntDelay;
double end = getCurrentTime();