hooks
This commit is contained in:
parent
eb097c1056
commit
5c46004c18
|
@ -312,8 +312,8 @@ shutdown(Error, #proto_state{peername = Peername, client_id = ClientId, will_msg
|
||||||
lager:info([{client, ClientId}], "Client ~s@~s: shutdown ~p",
|
lager:info([{client, ClientId}], "Client ~s@~s: shutdown ~p",
|
||||||
[ClientId, emqttd_net:format(Peername), Error]),
|
[ClientId, emqttd_net:format(Peername), Error]),
|
||||||
send_willmsg(ClientId, WillMsg),
|
send_willmsg(ClientId, WillMsg),
|
||||||
emqttd_cm:unregister(ClientId),
|
emqttd_broker:foreach_hooks('client.disconnected', [Error, ClientId]),
|
||||||
emqttd_broker:foreach_hooks('client.disconnected', [Error, ClientId]).
|
emqttd_cm:unregister(ClientId).
|
||||||
|
|
||||||
willmsg(Packet) when is_record(Packet, mqtt_packet_connect) ->
|
willmsg(Packet) when is_record(Packet, mqtt_packet_connect) ->
|
||||||
emqttd_message:from_packet(Packet).
|
emqttd_message:from_packet(Packet).
|
||||||
|
|
Loading…
Reference in New Issue