Skip to content
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

fix: update new subs with dds from publisher (backport #940) #960

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ def subscribe(self, client_id, callback):
# In any case, the first message is handled using new_sub_callback,
# which adds the new callback to the subscriptions dictionary.
self.new_subscriptions.update({client_id: callback})
infos = self.node_handle.get_publishers_info_by_topic(self.topic)
if any(pub.qos_profile.durability == DurabilityPolicy.TRANSIENT_LOCAL for pub in infos):
self.qos.durability = DurabilityPolicy.TRANSIENT_LOCAL
if any(pub.qos_profile.reliability == ReliabilityPolicy.BEST_EFFORT for pub in infos):
self.qos.reliability = ReliabilityPolicy.BEST_EFFORT
if self.new_subscriber is None:
self.new_subscriber = self.node_handle.create_subscription(
self.msg_class,
Expand Down
Loading