Oops, flush from queue before locking.

Added this last and clearly didn't test it carefully.  Fixes #8631.
This commit is contained in:
Unknown W. Brackets committed 2016-03-07 20:19:07 -08:00
1 parent 6f30401800
commit cc4e7c4b10
1 file changed
+6 -5
+6 -5
View File
@@ -763,13 +763,14 @@ again:
info = new GameInfo();
}
if (info->IsWorking()) {
// Uh oh, it's currently in process. It could mark pending = false with the wrong wantFlags.
// Let's wait it out, then queue.
WaitUntilDone(info);
}
{
lock_guard lock(info->lock);
if (info->IsWorking()) {
// Uh oh, it's currently in process. It could mark pending = false with the wrong wantFlags.
// Let's wait it out, then queue.
WaitUntilDone(info);
}
info->wantFlags |= wantFlags;
info->pending = true;
}