|
|
@@ -74,7 +74,7 @@ info(#protocol{client = Client,
|
|
|
will_msg = WillMsg,
|
|
|
topic_aliases = Aliases}) ->
|
|
|
#{client => Client,
|
|
|
- session => emqx_session:info(Session),
|
|
|
+ session => session_info(Session),
|
|
|
proto_name => ProtoName,
|
|
|
proto_ver => ProtoVer,
|
|
|
keepalive => Keepalive,
|
|
|
@@ -606,7 +606,7 @@ auth_connect(#mqtt_packet_connect{client_id = ClientId,
|
|
|
{ok, AuthResult} ->
|
|
|
{ok, PState#protocol{client = maps:merge(Client, AuthResult)}};
|
|
|
{error, Reason} ->
|
|
|
- ?LOG(warning, "Client ~s (Username: '~s') login failed for ~p",
|
|
|
+ ?LOG(warning, "Client ~s (Username: '~s') login failed for ~0p",
|
|
|
[ClientId, Username, Reason]),
|
|
|
{error, emqx_reason_codes:connack_error(Reason)}
|
|
|
end.
|
|
|
@@ -916,3 +916,8 @@ sp(false) -> 0.
|
|
|
|
|
|
flag(true) -> 1;
|
|
|
flag(false) -> 0.
|
|
|
+
|
|
|
+session_info(undefined) ->
|
|
|
+ undefined;
|
|
|
+session_info(Session) ->
|
|
|
+ emqx_session:info(Session).
|