Browse files

removed unused field on state record

  • Loading branch information...
1 parent de69536 commit b361848cbbba551a1ace1904e090d72a0821e0bf @videlalvaro committed May 7, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/rabbitmq_chat_rest.erl
View
4 src/rabbitmq_chat_rest.erl
@@ -4,7 +4,7 @@
-include("amqp_client.hrl").
-record(http_state, {req}).
--record(websocket_state, {ws, conn, exchange, chann, consumer, user_nb=0}).
+-record(websocket_state, {ws, conn, exchange, chann, consumer}).
-define(EXCHANGE_NAME, <<"chat_room">>).
@@ -63,7 +63,7 @@ handle(_, _, #http_state{req=Req}) ->
Req:ok([{"Content-Type", "text/plain"}], "Page not found.").
%% callback on received websockets data
-handle_websocket(#websocket_state{ws=Ws, conn=Conn, exchange=Exchange, user_nb=_Unb} = State) ->
+handle_websocket(#websocket_state{ws=Ws, conn=Conn, exchange=Exchange} = State) ->
Chann = get_chann(State#websocket_state.chann, Conn),
Consumer = maybe_start_consumer(State#websocket_state.consumer, [Chann, Exchange, self()]),
State2 = State#websocket_state{chann=Chann, consumer=Consumer},

0 comments on commit b361848

Please sign in to comment.