Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/phoenix/session_process.ex
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ defmodule Phoenix.SessionProcess do
@spec list_session() :: [{binary(), pid()}, ...]
def list_session() do
Registry.select(Phoenix.SessionProcess.Registry, [
{{:":$1", :":$2", :_}, [], [{{:":$1", :":$2"}}]}
{{:"$1", :"$2", :_}, [], [{{:"$1", :"$2"}}]}
])
end

Expand Down Expand Up @@ -143,7 +143,7 @@ defmodule Phoenix.SessionProcess do
@spec list_sessions_by_module(module()) :: [binary()]
def list_sessions_by_module(module) do
Registry.select(Phoenix.SessionProcess.Registry, [
{{:"$1", :"$2", :"$_"}, [], [{{:"$1", :"$2", :"$_"}}]}
{{:"$1", :"$2", :"$3"}, [], [{{:"$1", :"$2", :"$3"}}]}
])
|> Enum.filter(fn {_session_id, _pid, mod} -> mod == module end)
|> Enum.map(fn {session_id, _pid, _mod} -> session_id end)
Expand Down Expand Up @@ -209,7 +209,7 @@ defmodule Phoenix.SessionProcess do
current_pid = self()

Registry.select(Phoenix.SessionProcess.Registry, [
{{:":$1", :":$2", :_}, [{:==, :":$2", current_pid}], [{{:":$1", :":$2"}}]}
{{:"$1", :"$2", :_}, [{:==, :"$2", current_pid}], [{{:"$1", :"$2"}}]}
])
|> Enum.at(0)
|> elem(0)
Expand All @@ -231,7 +231,7 @@ defmodule Phoenix.SessionProcess do
current_pid = self()

Registry.select(Phoenix.SessionProcess.Registry, [
{{:":$1", :":$2", :_}, [{:==, :":$2", current_pid}], [{{:":$1", :":$2"}}]}
{{:"$1", :"$2", :_}, [{:==, :"$2", current_pid}], [{{:"$1", :"$2"}}]}
])
|> Enum.at(0)
|> elem(0)
Expand Down
Loading