Commit 2b37465f authored by Maxime Perrotin's avatar Maxime Perrotin

Avoid loosing messages in the GUI

If the same message was received twice by the msgQ poller before being displayed
by the GUI, one message could ve overwritten.
Now wait for the first message to be consumed before taking the next
one.
parent 91787ea5
......@@ -117,6 +117,9 @@ class MsgQ_Poller(QThread):
time.sleep(0.005)
continue
self.log.debug('MsgQ poller: received message')
while (g_tmPool[messageReceivedType].pendingTM):
# Wait until possible previous message has been consumed
time.sleep(0.005)
# Copy the message into the ASN.1 type instance of the editor
g_tmPool[messageReceivedType].asn1Instance.SetData(pDataFromMQ)
g_tmPool[messageReceivedType].pendingTM = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment