From 768bc2ed1d781f25e342f8573a521c71b2fdfdde Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Sat, 15 Aug 2015 23:33:51 +0800 Subject: [PATCH] hibernate --- src/emqttd_client.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emqttd_client.erl b/src/emqttd_client.erl index c2c08607f..c013c3055 100644 --- a/src/emqttd_client.erl +++ b/src/emqttd_client.erl @@ -110,11 +110,11 @@ handle_info({stop, duplicate_id, _NewPid}, State=#state{proto_state = ProtoState handle_info({deliver, Message}, State = #state{proto_state = ProtoState}) -> {ok, ProtoState1} = emqttd_protocol:send(Message, ProtoState), - {noreply, State#state{proto_state = ProtoState1}}; + {noreply, State#state{proto_state = ProtoState1}, hibernate}; handle_info({redeliver, {?PUBREL, PacketId}}, State = #state{proto_state = ProtoState}) -> {ok, ProtoState1} = emqttd_protocol:redeliver({?PUBREL, PacketId}, ProtoState), - {noreply, State#state{proto_state = ProtoState1}}; + {noreply, State#state{proto_state = ProtoState1}, hibernate}; handle_info({subscribe, TopicTable}, State = #state{proto_state = ProtoState}) -> {ok, ProtoState1} = emqttd_protocol:handle({subscribe, TopicTable}, ProtoState),