Skip to content

Commit

Permalink
Address bug found by typesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed May 16, 2024
1 parent c54d90c commit 34d0ffe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/phoenix/endpoint/cowboy2_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ defmodule Phoenix.Endpoint.Cowboy2Adapter do

{refs, child_specs} = Enum.unzip(refs_and_specs)

if drainer = (refs != [] && Keyword.get(config, :drainer, [])) do
if drainer = refs != [] && Keyword.get(config, :drainer, []) do
child_specs ++ [{Plug.Cowboy.Drainer, Keyword.put_new(drainer, :refs, refs)}]
else
child_specs
Expand Down Expand Up @@ -118,7 +118,7 @@ defmodule Phoenix.Endpoint.Cowboy2Adapter do

defp info(scheme, endpoint, ref) do
server = "cowboy #{Application.spec(:cowboy)[:vsn]}"
"Running #{inspect endpoint} with #{server} at #{bound_address(scheme, ref)}"
"Running #{inspect(endpoint)} with #{server} at #{bound_address(scheme, ref)}"
end

defp bound_address(scheme, ref) do
Expand Down Expand Up @@ -146,7 +146,7 @@ defmodule Phoenix.Endpoint.Cowboy2Adapter do

{:ok, address}
rescue
e -> {:error, e.message}
e -> {:error, Exception.message(e)}
end

defp make_ref(endpoint, scheme) do
Expand Down

0 comments on commit 34d0ffe

Please sign in to comment.