Skip to content

Commit

Permalink
Unlocking lock in all branch cases otherwise lock.lock () can double-…
Browse files Browse the repository at this point in the history
…lock. (#3572)
  • Loading branch information
clemahieu authored Dec 1, 2021
1 parent eecd3dc commit 7eddc04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nano/node/election_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ void nano::election_scheduler::run ()
election->transition_active ();
}
}
else
{
lock.unlock ();
}
notify ();
lock.lock ();
}
Expand Down

0 comments on commit 7eddc04

Please sign in to comment.