From eb097c1056b953795559c2270d4a0147be191bfa Mon Sep 17 00:00:00 2001 From: Feng Date: Tue, 14 Jul 2015 17:55:52 +0800 Subject: [PATCH] fix issue #193 --- CHANGELOG.md | 2 ++ src/emqttd_session.erl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de6566748..c448ea0dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ emqttd ChangeLog Bugfix: issue #189 - MQTT over WebSocket(SSL) cannot work? +Bugfix: issue #193 - 'client.ack' hook should be renamed to 'message.acked', and called by emqttd_broker:foreach_hooks + 0.9.0-alpha (2015-07-09) ------------------------- diff --git a/src/emqttd_session.erl b/src/emqttd_session.erl index ff92d4f05..1a5797631 100644 --- a/src/emqttd_session.erl +++ b/src/emqttd_session.erl @@ -602,7 +602,7 @@ acked(PktId, Session = #session{client_id = ClientId, awaiting_ack = Awaiting}) -> case lists:keyfind(PktId, 1, InflightQ) of {_, Msg} -> - emqttd_broker:foldl_hooks('client.acked', [ClientId], Msg); + emqttd_broker:foreach_hooks('message.acked', [ClientId, Msg]); false -> lager:error("Session(~s) cannot find acked message: ~p", [PktId]) end,