Backport #1089 to jazzy#1090
Merged
Merged
Conversation
…1089) RMF's request/response channel is a pub/sub pseudo-service, so more than one node can answer the same request_id (the RmfService docstring already notes clients must drop duplicated response ids). _handle_response dropped only *unknown* ids; for a known id it called fut.set_result() unconditionally. A second response for an already-resolved future raises asyncio.InvalidStateError inside the subscription callback, which runs in the rclpy.spin() thread (ros.py) and terminates it. After that the api-server node stops processing every subscription, so all task-api calls time out with HTTP 500 "rmf service timed out" even though the request was delivered and executed. Drop duplicate/late responses (fut.done()) so the spin thread survives, and add a regression test. Signed-off-by: levonti <levonti@ileo.cloud> Co-authored-by: levonti <levonti@ileo.cloud> (cherry picked from commit 0ee3494) Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
koonpeng
approved these changes
Jun 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(cherry picked from commit 0ee3494)
GenAI Use
We follow OSRA's policy on GenAI tools
Generated-by: