Emulator should process queued commands before exiting

This commit is contained in:
John Lewin 2017-11-30 14:01:48 -08:00
parent bc7b7c615c
commit 7900faeb01

View file

@ -625,16 +625,21 @@ namespace MatterHackers.PrinterEmulator
{
if (receiveQueue.Count == 0)
{
receiveResetEvent.WaitOne();
}
if (shuttingDown)
{
return;
}
if (shuttingDown)
{
return;
receiveResetEvent.WaitOne();
}
if (receiveQueue.Count == 0)
{
if (shuttingDown)
{
return;
}
Thread.Sleep(10);
}
else