[core] Gate publisher sends by active connection layer - #2680
[core] Gate publisher sends by active connection layer#2680KerstinKeller wants to merge 2 commits into
Conversation
Track the selected transport layer per subscriber connection and derive per-layer send_enabled state so stale writer objects no longer emit data after their last matching subscriber disconnects.
| mutable std::mutex m_connection_map_mutex; | ||
| SSubscriptionMapT m_connection_map; | ||
| std::atomic<size_t> m_connection_count{ 0 }; | ||
| std::atomic<bool> m_udp_send_enabled{ false }; |
There was a problem hiding this comment.
instead of an std::atomic we should use connection counters, as we can increase / decrease them upon registration / unregistration which eliminates the need to iterate over the map every time.
|
This is already better than what we had previously. However we still have a problem. With this PR, we currently won't send out data for pending connections, which is a different behavior than previously. Anyways the logic is brittle, and what we need is a true handshake, as we get e.g. in TCP, instead of a heuristic via the monitoring. |
Track the selected transport layer per subscriber connection and derive per-layer send_enabled state so stale writer objects no longer emit data after their last matching subscriber disconnects.
Description
Related issues