Closed PetterVMC closed 2 years ago
This should fix the problem also mentioned in Issue https://github.com/code-iai/ROSIntegration/issues/113
I used to handle this in all of my EndPlay() calls, but this is a nice addition. Do you think you could append to your code a function to handle unadvertising for services too?
Thanks for the nice addition!
@tsender
I used to handle this in all of my EndPlay() calls, but this is a nice addition. Do you think you could append to your code a function to handle unadvertising for services too?
Sure! I haven't used services with ROSIntegration yet though and don't have the chance to test it quickly right now. So perhaps it's best if someone that can test it would add it.
There was a problem in the scenario with high frequency subscription messages. If a message arrived after UROSIntegrationGameInstance::Shutdown(), it would try to trigger an invocation of a subscription callback during an unsafe topic state, causing a crash (not in the callback implementation, but in ROSIntegration). Therefore, unsubribe all topics in beginning of shutdown to ignore messages arriving after.
Also, at the same moment, unadvertise all topics.