diff --git a/lib/phoenix/socket.ex b/lib/phoenix/socket.ex index 77286a8db1..8a8a3d69ac 100644 --- a/lib/phoenix/socket.ex +++ b/lib/phoenix/socket.ex @@ -672,7 +672,11 @@ defmodule Phoenix.Socket do payload: reply } + state = put_channel(state, pid, topic, join_ref) + + num_channels = map_size(state.channels) + :telemetry.execute([:phoenix, :socket, :joined_channels], %{total: num_channels}) {:reply, :ok, encode_reply(socket, reply), {state, socket}} {:error, reply} ->