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!
The RegisterObjectHandler sends a ManyCast message to all subscribed federates when a new object is created. The producing federate is removed from the list of subscribed federates, to prevent it from receiving a Discover message on its own objects. However, if no other federates subscribe to the object class, the list of subscribers is empty. The queueManycast method takes an empty list of recipients to mean that the message should be broadcast to everybody, meaning the producing federate will receive a DiscoverObject call on its own object. Fixed by adding a check to avoid sending the DiscoverObject message when the list of recipients is empty.
The RegisterObjectHandler sends a ManyCast message to all subscribed federates when a new object is created. The producing federate is removed from the list of subscribed federates, to prevent it from receiving a Discover message on its own objects. However, if no other federates subscribe to the object class, the list of subscribers is empty. The queueManycast method takes an empty list of recipients to mean that the message should be broadcast to everybody, meaning the producing federate will receive a DiscoverObject call on its own object. Fixed by adding a check to avoid sending the DiscoverObject message when the list of recipients is empty.