LabVIEW-Open-Source / MQTT-Connection

Fundamental building blocks for building MQTT clients and servers
Other
2 stars 1 forks source link

Session process should have a mechanism for terminating loops if hung #6

Closed francois-normandin closed 2 years ago

francois-normandin commented 2 years ago

There are three loops in the Session process. Upon disconnection, the byte processing loop can hang on an infinite timeout while the session mailbox is destroyed. This is a symptom of a race condition in the disconnection process.

While the race condition should be fixed at the source, it is preferable to kill the middle loop if the other loops have terminated.

Add this snippet on the bottom loop's termination: image

To investigate race condition: figure out what are the conditions for the third loop terminating without destroying the queue.

francois-normandin commented 2 years ago

Fixed in 3.1.4 package