Fixed the unloading severe warning by adding a shutdown function in#15
Fixed the unloading severe warning by adding a shutdown function in#15
Conversation
network_bridge. Added try-catch in udp_bridge for a clean exit as well.
|
This should fix #2 as far as I can see. |
|
These code formatting tools are really starting to drive me crazy. |
|
Wow, that's hilarious, the two distributions are configured to uncrustify differently. It's not even possible to get them all to pass with a comment like this. Let me see if I can configure uncrustify to be consistent... |
|
Sorry for the white space annoyance. The linter settings is not the way I code, and ament_uncrustify did not search for files recursively, so I kept missing white spaces to fix. |
Thanks for the reference, I'll look into it! |
|
It's becoming harder to make the linter happy than to fix bad pointers... not sure I approve this evolution. |
This PR adds a shutdown function in network bridge, to be called between the end of spin and the shared pointer reset. The shared_from_this objects in network_bridge seem to prevent the garbage collector to start at the right moment.
Also added a try-catch in udp_bridge for a clean exit when the connection has been closed before the object is destroyed.