Skip to content

Commit

Permalink
Merge pull request #689 from mozilla/hotfix/688
Browse files Browse the repository at this point in the history
hotfix PR #688
  • Loading branch information
johnshaughnessy authored Mar 2, 2023
2 parents 10dfc4e + fe68338 commit f9d6d6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ret/hub.ex
Original file line number Diff line number Diff line change
Expand Up @@ -655,13 +655,15 @@ defmodule Ret.Hub do
host = RoomAssigner.get_available_host(hub.host)

if host && host != hub.host do
hub |> changeset_for_new_host(host) |> Repo.update!()
updated_hub = hub |> changeset_for_new_host(host) |> Repo.update!()

RetWeb.Endpoint.broadcast("hub:" <> hub.hub_sid, "host_changed", %{
host: host,
port: Hub.janus_port(),
turn: Hub.generate_turn_info()
})

updated_hub
else
hub
end
Expand Down

0 comments on commit f9d6d6a

Please sign in to comment.