mirror of https://github.com/Desuuuu/klipper.git
serialqueue: Don't clear must_exit flag at start of pollreactor_run()
Avoid a timing race where must_exit is set before pollreactor_run() is started. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
7733e1d832
commit
239c1ad5c9
|
@ -147,7 +147,6 @@ pollreactor_check_timers(struct pollreactor *pr, double eventtime)
|
||||||
static void
|
static void
|
||||||
pollreactor_run(struct pollreactor *pr)
|
pollreactor_run(struct pollreactor *pr)
|
||||||
{
|
{
|
||||||
pr->must_exit = 0;
|
|
||||||
double eventtime = get_monotonic();
|
double eventtime = get_monotonic();
|
||||||
while (! pr->must_exit) {
|
while (! pr->must_exit) {
|
||||||
int timeout = pollreactor_check_timers(pr, eventtime);
|
int timeout = pollreactor_check_timers(pr, eventtime);
|
||||||
|
|
Loading…
Reference in New Issue