nasa / TrickHLA

TrickHLA: An IEEE 1516 High Level Architecture (HLA) Simulation Interoperability Standard Implementation for Trick Base Simulations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExecutionControl::unsubscribe() comment disagreement with code

simtheverse opened this issue · comments

void ExecutionControl::unsubscribe()
{
// Check to see if we are the Master federate.
if ( this->is_master() ) {
// Unsubscribe from the execution configuration if we are NOT the Master federate.
execution_configuration->unsubscribe_all_object_attributes();
}

Lines 480 and 481 seem to contradict each other. I am reading the implementation to be: Unsubscribe from the execution configuration if we ARE the Master federate.

Awesome project, thanks!

Yes, this is a bug. The check needs to be for if this federate is not the master. Thank you for your bug report.

Fixed and tested.