Fix: racing condition with messages when the queue is full (#223)

There was a racing condition between the queue full message and *any* error message where the later are overwritten by the former.
This commit is contained in:
Luis Uguina
2020-05-11 21:51:36 +10:00
committed by GitHub
parent 18b99ded40
commit 26155a28dc
2 changed files with 10 additions and 7 deletions

View File

@@ -358,14 +358,17 @@ public class Client {
this.renderingJob = null; this.renderingJob = null;
} }
if (this.shouldWaitBeforeRender() == true) {
this.gui.status("Sending frames. Please wait");
while (this.shouldWaitBeforeRender() == true) { while (this.shouldWaitBeforeRender() == true) {
try { try {
Thread.sleep(4000); // wait a little bit Thread.sleep(4000); // wait a little bit
this.gui.status("Sending frames. Please wait");
} }
catch (InterruptedException e3) { catch (InterruptedException e3) {
} }
} }
}
this.log.removeCheckPoint(step); this.log.removeCheckPoint(step);
} }

View File

@@ -206,7 +206,7 @@ public class GuiSwing extends JFrame implements Gui {
@Override @Override
public void error(String msg_) { public void error(String msg_) {
status(msg_); status(msg_, true);
} }
@Override @Override