From 89c939b321565a2d98615c642a09b5ed2824100e Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Wed, 24 Jun 2015 00:37:58 +0800 Subject: [PATCH] {subscribe, TopicTable} --- src/emqttd_ws_client.erl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/emqttd_ws_client.erl b/src/emqttd_ws_client.erl index 0270d7d38..c72f46511 100644 --- a/src/emqttd_ws_client.erl +++ b/src/emqttd_ws_client.erl @@ -135,8 +135,8 @@ handle_info({redeliver, {?PUBREL, PacketId}}, #client_state{proto_state = ProtoS {ok, ProtoState1} = emqttd_protocol:redeliver({?PUBREL, PacketId}, ProtoState), {noreply, State#client_state{proto_state = ProtoState1}}; -handle_info({subscribe, Topic, Qos}, #client_state{proto_state = ProtoState} = State) -> - {ok, ProtoState1} = emqttd_protocol:handle({subscribe, Topic, Qos}, ProtoState), +handle_info({subscribe, TopicTable}, #client_state{proto_state = ProtoState} = State) -> + {ok, ProtoState1} = emqttd_protocol:handle({subscribe, TopicTable}, ProtoState), {noreply, State#client_state{proto_state = ProtoState1}}; handle_info({stop, duplicate_id, _NewPid}, State=#client_state{proto_state = ProtoState}) -> @@ -145,7 +145,6 @@ handle_info({stop, duplicate_id, _NewPid}, State=#client_state{proto_state = Pro handle_info({keepalive, start, TimeoutSec}, State = #client_state{request = Req}) -> lager:debug("Client(WebSocket) ~s: Start KeepAlive with ~p seconds", [Req:get(peer), TimeoutSec]), - %%TODO: fix esockd_transport... KeepAlive = emqttd_keepalive:new({esockd_transport, Req:get(socket)}, TimeoutSec, {keepalive, timeout}), {noreply, State#client_state{keepalive = KeepAlive}};