Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix callback accessing invalid reference to promise (#268)
### Public-Facing Changes Fix callback accessing invalid reference to promise ### Description For ROS1, the service request and response types can only be retrieved by opening a connection to the service server. For this, we use `ros::ServiceManager::instance()->createServiceServerLink` which under the hood keeps a copy of the returned pointer, effectively keeping the connection alive. This patch makes sure that we drop the connection when we either have received the header or when the timeout has been exceeded. This avoids that the header-received callback is being called with an invalid reference to the promise. Fixes #267 Resolves FG-5366
- Loading branch information