Skip to content

Conversation

@cedricpradalier
Copy link
Collaborator

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.

Cedric Pradalier added 2 commits September 12, 2025 22:43
@cedricpradalier
Copy link
Collaborator Author

This should fix #2 as far as I can see.

@brow1633
Copy link
Owner

These code formatting tools are really starting to drive me crazy.

@brow1633
Copy link
Owner

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...

@cedricpradalier
Copy link
Collaborator Author

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.
I contributed to https://github.com/ros-drivers/phidgets_drivers, and they have a nice "lint-on-commit" workflow which was really nice to work with.

@brow1633
Copy link
Owner

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. I contributed to https://github.com/ros-drivers/phidgets_drivers, and they have a nice "lint-on-commit" workflow which was really nice to work with.

Thanks for the reference, I'll look into it!

@brow1633 brow1633 merged commit 87a5072 into main Sep 12, 2025
19 of 20 checks passed
@cedricpradalier
Copy link
Collaborator Author

It's becoming harder to make the linter happy than to fix bad pointers... not sure I approve this evolution.

@cedricpradalier cedricpradalier deleted the unloading_bug branch September 12, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants