未验证 提交 0a779c74 编写于 作者: H haojun Liao 提交者: GitHub

Merge pull request #4478 from taosdata/bugfix/td-2373

[TD-2373]<fix>: data race in removeFromWheel
......@@ -225,10 +225,11 @@ static void addToWheel(tmr_obj_t* timer, uint32_t delay) {
}
static bool removeFromWheel(tmr_obj_t* timer) {
if (timer->wheel >= tListLen(wheels)) {
uint8_t wheelIdx = timer->wheel;
if (wheelIdx >= tListLen(wheels)) {
return false;
}
time_wheel_t* wheel = wheels + timer->wheel;
time_wheel_t* wheel = wheels + wheelIdx;
bool removed = false;
pthread_mutex_lock(&wheel->mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册