Skip to content

Commit

Permalink
Handle take failure in wait_for_message (#1172) (#1174)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
(cherry picked from commit 5ee7ad4)

Co-authored-by: mhidalgo-bdai <[email protected]>
  • Loading branch information
mergify[bot] and mhidalgo-bdai authored Sep 28, 2023
1 parent 236f7c9 commit e9bd428
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rclpy/rclpy/wait_for_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def wait_for_message(
if subs_ready:
if sub.handle.pointer in subs_ready:
msg_info = sub.handle.take_message(sub.msg_type, sub.raw)
return (True, msg_info[0])
if msg_info is not None:
return (True, msg_info[0])

return (False, None)

0 comments on commit e9bd428

Please sign in to comment.