-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
always check if the service is available, even if the graph event wasn't triggered #262
Conversation
3b0ea87
to
41f8793
Compare
41f8793
to
3390a7c
Compare
return true; | ||
} | ||
event->check_and_clear(); // reset the event | ||
if (this->service_is_ready()) { // check if the service is ready regardless |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment won't be clear once the context of this PR/commit is lost
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regardless of the event state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
// always check if the service is ready, even if the graph event wasn't triggered
// (see https://github.com/ros2/rmw_connext/issues/201)
unless that's then too specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I know this is captured in the commit message but that can get annoying to track down once the files get moved around)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sure, I'm always in favor of more descriptive comments, can you push that change?
…n't triggered (#262) * always check if the service is available, even if the graph event wasn't triggered * more descriptive comment * Even more descriptive in case the link ever breaks
* Add badge for license * Add badge for build and test Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
This is needed to avoid the race condition that is specific to our Connext code, outlined in this issue:
ros2/rmw_connext#201
Basically the assumption "we only need to check the service is available function after a graph event because the state can only change after the graph event is triggered" does not hold. As there is apparently a race between setting the graph event and the underlying state reflecting the full change.
Connects to ros2/rmw_connext#168