Last active
August 18, 2016 14:06
Revisions
-
zamith revised this gist
Aug 10, 2015 . 1 changed file with 19 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ [error] GenServer #PID<0.299.0> terminating Last message: %Phoenix.Socket.Message{event: "help_needed", payload: %{}, ref: "2", topic: "help"} State: %Phoenix.Socket{assigns: %{}, channel: HelpPlease.HelpChannel, channel_pid: #PID<0.299.0>, endpoint: HelpPlease.Endpoint, joined: true, pubsub_server: HelpPlease.PubSub, ref: nil, topic: "help", transport: Phoenix.Transports.WebSocket, transport_pid: #PID<0.297.0>} ** (exit) an exception was raised: ** (RuntimeError) Expected `handle_in/3` to return one of: {:noreply, Socket.t} | {:reply, {status :: atom, response :: map}, Socket.t} | {:reply, status :: atom, Socket.t} | {:stop, reason :: term, Socket.t} | {:stop, reason :: term, {status :: atom, response :: map}, Socket.t} | {:stop, reason :: term, status :: atom, Socket.t} got {:no_reply, %Phoenix.Socket{assigns: %{}, channel: HelpPlease.HelpChannel, channel_pid: #PID<0.299.0>, endpoint: HelpPlease.Endpoint, joined: true, pubsub_server: HelpPlease.PubSub, ref: "2", topic: "help", transport: Phoenix.Transports.WebSocket, transport_pid: #PID<0.297.0>}} (phoenix) lib/phoenix/channel/server.ex:255: Phoenix.Channel.Server.handle_result/2 (stdlib) gen_server.erl:593: :gen_server.try_dispatch/4 (stdlib) gen_server.erl:659: :gen_server.handle_msg/5 (stdlib) proc_lib.erl:237: :proc_lib.init_p_do_apply/3 -
zamith created this gist
Aug 10, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ helpButton.on("click", event => { chan.push("help_needed", {}) }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ def handle_in("help_needed", payload, socket) do broadcast! socket, "help_needed", payload {:no_reply, socket} end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ socket "/ws" do channel "help", HelpPlease.HelpChannel end