Skip to content

Commit

Permalink
Lock when clearing resp.
Browse files Browse the repository at this point in the history
  • Loading branch information
Barenboim committed Aug 19, 2024
1 parent fba3a92 commit b262623
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/factory/RedisTaskImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ ComplexRedisSubscribeTask::SubscribeWrapper::next_in(ProtocolMessage *message)
task_->watching_ = true;
task_->extract_(task_);

task_.mutex.lock();
task_->clear_resp();
task_.mutex.unlock();
return task_->finished_ ? NULL : &task_->resp;
}

Expand Down

0 comments on commit b262623

Please sign in to comment.