Skip to content

Commit

Permalink
fix deadlock while free tsc object
Browse files Browse the repository at this point in the history
  • Loading branch information
guanshengliang committed May 29, 2020
1 parent 1a9fc80 commit 706b535
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/src/tscSql.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,10 @@ void taos_free_result_imp(TAOS_RES *res, int keepCmd) {
tscProcessSql(pSql);

// waits for response and then goes on
sem_wait(&pSql->rspSem);
STscObj* pTscObj = pSql->pTscObj;
if (pTscObj->pSql == pSql) {
sem_wait(&pSql->rspSem);
}
} else { // if no free resource msg is sent to vnode, we free this object immediately.
STscObj* pTscObj = pSql->pTscObj;

Expand Down

0 comments on commit 706b535

Please sign in to comment.