openlvc / portico

Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!
http://www.porticoproject.org
151 stars 81 forks source link

Make ResponseCorrelator class more thread-safe #325

Closed martinffi closed 3 years ago

martinffi commented 3 years ago

I have come across a bug where a thread checks if an ID exists in the responseMap, but another thread seems to have deleted the object associated with the ID by the time the code tries to get the object from the responseMap. All operations on the responseMap are now put inside synchronized blocks, to avoid several threads modifying its contents at the same time.

martinffi commented 3 years ago

I had accidentally left a bug in the code