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:
Kevin O'Connor 2018-02-26 16:19:56 -05:00
parent 7733e1d832
commit 239c1ad5c9
1 changed files with 0 additions and 1 deletions

View File

@ -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);