You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix cascade failure in PhoenixSignaling.Registry (#40)
* Fix cascade failure in PhoenixSignaling.Registry
Signaling processes created by get_or_create were linked to the Registry
via Signaling.new() (which calls GenServer.start_link). When any signaling
process exited with a non-normal reason (e.g. a viewer's WebRTC connection
failing), the link took down the Registry, which sent EXIT signals to
every other linked signaling process, killing all active streams.
Changes:
- Unlink signaling processes from the Registry and monitor them instead
- Clean up dead entries from the signaling map via :DOWN handler
- Use get/1 instead of get!/1 in Channel.handle_in to gracefully close
the channel when a signaling process has already exited
- Change supervisor strategy from one_for_all to one_for_one since the
WhipRegistry and PhoenixSignaling.Registry are independent
---------
Co-authored-by: George Alexander Day <georgealexanderday@proton.me>
0 commit comments