fix: use masp:get/3 to avoid crash after match failure
This commit is contained in:
parent
d72da3ecf6
commit
3b43cca5bf
|
@ -251,7 +251,7 @@ eventmsg_disconnected(_ClientInfo = #{
|
||||||
disconnected_at => DisconnectedAt
|
disconnected_at => DisconnectedAt
|
||||||
}).
|
}).
|
||||||
|
|
||||||
eventmsg_connack(_ConnInfo = #{
|
eventmsg_connack(ConnInfo = #{
|
||||||
clientid := ClientId,
|
clientid := ClientId,
|
||||||
clean_start := CleanStart,
|
clean_start := CleanStart,
|
||||||
username := Username,
|
username := Username,
|
||||||
|
@ -259,11 +259,11 @@ eventmsg_connack(_ConnInfo = #{
|
||||||
sockname := SockName,
|
sockname := SockName,
|
||||||
proto_name := ProtoName,
|
proto_name := ProtoName,
|
||||||
proto_ver := ProtoVer,
|
proto_ver := ProtoVer,
|
||||||
keepalive := Keepalive,
|
connected_at := ConnectedAt
|
||||||
connected_at := ConnectedAt,
|
|
||||||
conn_props := ConnProps,
|
|
||||||
expiry_interval := ExpiryInterval
|
|
||||||
}, Reason) ->
|
}, Reason) ->
|
||||||
|
Keepalive = maps:get(keepalive, ConnInfo, 0),
|
||||||
|
ConnProps = maps:get(conn_props, ConnInfo, #{}),
|
||||||
|
ExpiryInterval = maps:get(expiry_interval, ConnInfo, 0),
|
||||||
with_basic_columns('client.connack',
|
with_basic_columns('client.connack',
|
||||||
#{reason_code => reason(Reason),
|
#{reason_code => reason(Reason),
|
||||||
clientid => ClientId,
|
clientid => ClientId,
|
||||||
|
|
Loading…
Reference in New Issue