Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Conversation

jannikb
Copy link
Contributor

@jannikb jannikb commented Jun 19, 2014

For use-case 1:
When subscribing to oneself, subscribers do not wait for answer to send-tcp-header because it would otherwise deadlock. This is applicable because the answer has always been ignored anyway. Additionally, we know the md5 sums to match because we are the same node. Finally, in case of self-subscription publisher do not send response to received tcp-header.

For use-case 2:
When subscribing to oneself, subscribers do not send an xml-rpc to avoid a deadlock. Instead, they directly call |requestTopic| on themselves.

@airballking
Copy link
Contributor

@moesenle Could you make a quick code review? I will do some further testing, today.

(dbind (protocol address port)
;; Check if it's our publisher if that's the case don't request the topic
;; using a ros-rpc-call since it would deadlock and time out
(if (equal uri *xml-rpc-caller-api*)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment on Lisp style: I would only use IF if there is just one small expression in the if and else block. For multiple lines, I would always use COND. But that's really just a minor thing.

@moesenle
Copy link
Contributor

I just gave it a very quick review and trust that you tested it. Looks quite good and I'm really happy that finally someone fixed the self-subscription problem. Great work and thanks!

moesenle added a commit that referenced this pull request Jun 25, 2014
@moesenle moesenle merged commit 74729b2 into ros:master Jun 25, 2014
@airballking
Copy link
Contributor

@moesenle Thanks for reviewing and merging! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants