fix issue #306
This commit is contained in:
parent
7186ba2a21
commit
ba9534a683
|
@ -311,13 +311,14 @@ trace(send, Packet, #proto_state{peername = Peername, client_id = ClientId}) ->
|
|||
redeliver({?PUBREL, PacketId}, State) ->
|
||||
send(?PUBREL_PACKET(PacketId), State).
|
||||
|
||||
shutdown(duplicate_id, _State) ->
|
||||
quiet; %%
|
||||
|
||||
shutdown(Error, #proto_state{client_id = undefined}) ->
|
||||
lager:info("Protocol shutdown ~p", [Error]),
|
||||
ignore;
|
||||
|
||||
shutdown(duplicate_id, #proto_state{client_id = ClientId}) ->
|
||||
%% unregister the device
|
||||
emqttd_cm:unregister(ClientId);
|
||||
|
||||
%% TODO: ClientId??
|
||||
shutdown(Error, #proto_state{peername = Peername, client_id = ClientId, will_msg = WillMsg}) ->
|
||||
lager:info([{client, ClientId}], "Client ~s@~s: shutdown ~p",
|
||||
|
|
Loading…
Reference in New Issue