Format emqx_protocol module

This commit is contained in:
Feng Lee 2018-08-31 00:48:23 +08:00
parent 1574d85570
commit dc9a1cd80f
1 changed files with 12 additions and 11 deletions

View File

@ -267,7 +267,8 @@ process_packet(?CONNECT_PACKET(
%% Msg -> emqx_mountpoint:mount(MountPoint, Msg)
WillMsg = emqx_packet:will_msg(Connect),
PState1 = set_username(Username, PState#pstate{client_id = ClientId,
PState1 = set_username(Username,
PState#pstate{client_id = ClientId,
proto_ver = ProtoVer,
proto_name = ProtoName,
clean_start = CleanStart,
@ -681,7 +682,7 @@ inc_stats(Type, Stats = #{pkt := PktCnt, msg := MsgCnt}) ->
shutdown(_Reason, #pstate{client_id = undefined}) ->
ok;
shutdown(_Reason, PState = #pstate{connected = false}) ->
shutdown(_Reason, #pstate{connected = false}) ->
ok;
shutdown(Reason, #pstate{client_id = ClientId}) when Reason =:= conflict;
Reason =:= discard ->