-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
I don't know much about how message-id based lastErrors are to be used, but it seems like there could be some concurrency issues:
For example, lastError.startRequest() is called in connThread() without any mutex, and it in turn calls lastError.get() which reads and modifies the lastError._ids map without a mutex. Since there's only one global lastError object shared by all threads this could be a problem. In addition, only the top two bytes of the message id are used to map a LastError object. Conceivably a single LastError object could be used by two threads, though depending on usage perhaps this is prevented in practice?