From df8414dbdcbcba0d70dbb6747ea8a9e4dd366d02 Mon Sep 17 00:00:00 2001 From: Feng Date: Fri, 27 Nov 2015 21:01:18 +0800 Subject: [PATCH 1/4] 0.13.1 --- src/emqttd.app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqttd.app.src b/src/emqttd.app.src index 8ebfbe721..4e77ea1bb 100644 --- a/src/emqttd.app.src +++ b/src/emqttd.app.src @@ -1,7 +1,7 @@ {application, emqttd, [ {id, "emqttd"}, - {vsn, "0.13.0"}, + {vsn, "0.13.1"}, {description, "Erlang MQTT Broker"}, {modules, []}, {registered, []}, From e78d4fc39bb19e3cb08a16d2d35e47967714abf6 Mon Sep 17 00:00:00 2001 From: Feng Date: Fri, 27 Nov 2015 22:36:12 +0800 Subject: [PATCH 2/4] fix issue #383 --- src/emqttd_session.erl | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/emqttd_session.erl b/src/emqttd_session.erl index 193b6b3fe..1cbe7be22 100644 --- a/src/emqttd_session.erl +++ b/src/emqttd_session.erl @@ -79,6 +79,9 @@ %% Client Pid bind with session client_pid :: pid(), + %% Old Client Pid that has been kickout + old_client_pid :: pid(), + %% Last packet id of the session packet_id = 1, @@ -403,11 +406,12 @@ handle_cast({resume, ClientId, ClientPid}, Session = #session{client_id = C %% Clear awaiting_comp timers [cancel_timer(TRef) || TRef <- maps:values(AwaitingComp)], - Session1 = Session#session{client_pid = ClientPid, - clean_sess = false, - awaiting_ack = #{}, - awaiting_comp = #{}, - expired_timer = undefined}, + Session1 = Session#session{client_pid = ClientPid, + old_client_pid = OldClientPid, + clean_sess = false, + awaiting_ack = #{}, + awaiting_comp = #{}, + expired_timer = undefined}, %% CleanSess: true -> false? if @@ -561,6 +565,10 @@ handle_info({'EXIT', ClientPid, Reason}, Session = #session{clean_sess = fals TRef = timer(Expires, expired), hibernate(Session#session{client_pid = undefined, expired_timer = TRef}); +handle_info({'EXIT', Pid, _Reason}, Session = #session{old_client_pid = Pid}) -> + %%ignore + hibernate(Session); + handle_info({'EXIT', Pid, Reason}, Session = #session{client_pid = ClientPid}) -> ?LOG(error, "Unexpected EXIT: client_pid=~p, exit_pid=~p, reason=~p", @@ -595,7 +603,8 @@ kick(_ClientId, Pid, Pid) -> kick(ClientId, OldPid, Pid) -> unlink(OldPid), OldPid ! {shutdown, conflict, {ClientId, Pid}}, - ok. + %% Clean noproc + receive {'EXIT', OldPid, _} -> ok after 0 -> ok end. %%------------------------------------------------------------------------------ %% Check inflight and awaiting_rel From b70d5e35641e355c6d623c011775b9eeb4c3184d Mon Sep 17 00:00:00 2001 From: Feng Date: Fri, 27 Nov 2015 23:06:51 +0800 Subject: [PATCH 3/4] update pgsql --- plugins/emqttd_plugin_pgsql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/emqttd_plugin_pgsql b/plugins/emqttd_plugin_pgsql index 4c39043f8..956c38194 160000 --- a/plugins/emqttd_plugin_pgsql +++ b/plugins/emqttd_plugin_pgsql @@ -1 +1 @@ -Subproject commit 4c39043f8a9c64dd851ba0c2a434d725a08a261a +Subproject commit 956c38194113825784103af2bc7bfbc2a762f55d From 2b45ac1f7d46234b363018c6744f7d2583a5bc2b Mon Sep 17 00:00:00 2001 From: Feng Date: Sat, 28 Nov 2015 10:58:57 +0800 Subject: [PATCH 4/4] 0.13.1 --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f941c6cea..2e79f60ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ emqttd ChangeLog ================== +0.13.1-beta(2015-11-28) +------------------------- + +Bugfix: Plugin pathes error under windows (#387) + +Improve: Too many error logs "[error] Session ..... Unexpected EXIT: client_pid=<0.14137.35>, exit_pid=<0.30829.22>, reason=nop..." (#383) + +Improve: Define QOS0/1/2, Pooler Error (PR#382) + +Improve: High CPU load when 400K unstable mobile connections (#377) + +BugFix: emqttd_plugin_pgsql - error using same query with latest update plugin (pgsql#5) + + 0.13.0-beta(2015-11-08) -------------------------