Skip to content

Commit

Permalink
avoid possible lock race issue raise with sanitize
Browse files Browse the repository at this point in the history
  • Loading branch information
karlheyes committed Mar 25, 2023
1 parent dfeb759 commit cb6d450
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,10 @@ static void worker_add_pending_clients (worker_client_t *wc)
static void worker_wait (worker_client_t *wc)
{
worker_t *worker = wc->worker;
int ret = 0, duration = 1;
int ret = 0, duration = 1, running = worker->running;

thread_spin_unlock (&worker->lock);
if (worker->running)
if (running)
{
uint64_t tm = worker_check_time_ms (worker);
if (wc->wakeup_ms > tm)
Expand Down

0 comments on commit cb6d450

Please sign in to comment.