-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass goal handle to goal response callback instead of a future (#1311)
* Pass goal handle to goal response callback instead of a future This resolves an issue where `promise->set_value` is called before a potential call to `promise->set_exception`. If there is an issue sending a result request, set the exception on the future to the result in the goal handle, instead of the future to the goal handle itself. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Do not remove goal handle from list if result request fails This way the user can still interact with the goal (e.g. send a cancel request). Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Set the result awareness to false if goal handle is invalidated This will cause an exception when trying to get the future to result, in addition to the exception when trying to access values for existing references to the future. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Revert "Set the result awareness to false if goal handle is invalidated" This reverts commit d444e09. * Throw from Client::async_get_result if the goal handle was invalidated due to a failed result request Propagate error message from a failed result request. Also set result awareness to false if the result request fails so the user can also check before being hit with an exception. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Guard against mutliple calls to invalidate Signed-off-by: Jacob Perron <jacob@openrobotics.org>
- Loading branch information
1 parent
e62f328
commit bf1396b
Showing
5 changed files
with
62 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters