   @moduledoc false
   require Logger
 
-  ## Phoenix API
-
   @doc """
-  Starts the cowboy adapter
+  Starts the cowboy adapter.
 
   ## Custom dispatch options
 

  It is also important to specify your handlers first, otherwise Phoenix will
  intercept the requests before they get to your handler
  """
  def start_link(_scheme, endpoint, _config, {m, f, a}) do
    case apply(m, f, a) do
      {:ok, pid} ->
        Logger.info info(endpoint)
        {:ok, pid}

      {:error, {:shutdown, {_, _, {{_, {:error, :eaddrinuse}}, _}}}} = error ->
        Logger.error [info(endpoint), " failed, port already in use"]
        error

      {:error, _} = error ->

  defp maybe_send(other, plug) do
    raise "Cowboy adapter expected #{inspect plug} to return Plug.Conn but got: #{inspect other}"
  end
end
