Permalink
Browse files

Fixing websockets

  • Loading branch information...
1 parent 717dae1 commit 828f79c6be431fa3cc650ca0e4c986288254d029 @jeregrine committed Feb 22, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −1 lib/phoenix/controller/websocket.ex
  2. +0 −2 lib/phoenix/router/router.ex
@@ -29,7 +29,9 @@ defmodule Phoenix.Controller.Websocket do
"""
defmacro __using__(state \\ []) do
- quote do
+ quote location: :keep do
+ @behaviour :cowboy_websocket_handler
+
@doc false
def init({:tcp, :http}, _req, _opts) do
{:upgrade, :protocol, :cowboy_websocket}
@@ -32,8 +32,6 @@ defmodule Phoenix.Router do
options = Dict.put(@options, :dispatch, dispatch)
end
- IO.inspect options
-
IO.puts "Running #{__MODULE__} with Cowboy with #{inspect options}"
Plug.Adapters.Cowboy.http __MODULE__, [], options
end

0 comments on commit 828f79c

Please sign in to comment.