When publishing a pubsub message, ipc_endpoint_publish() sends the
message to all subscribers, including the endpoint that is used to
send the message, if it is subscribed to that topic. However, an
endpoint should not receive its own messages.
This commit modifies ipc_endpoint_publish() so that it skips over
the sending endpoint if it is among the recipients.
fi
while read -r subscriber; do
+ if [[ "$subscriber" == "$endpoint" ]]; then
+ continue
+ fi
ipc_endpoint_send "$endpoint" "$subscriber" "$message" "$topic"
done < <(_ipc_endpoint_topic_get_subscribers "$topic")