fix: use masp:get/3 to avoid crash after match failure
This commit is contained in:
parent
4991dcbe3b
commit
cead8c9056
|
@ -172,18 +172,18 @@ eventmsg_connected(_ClientInfo = #{
|
|||
is_bridge := IsBridge,
|
||||
mountpoint := Mountpoint
|
||||
},
|
||||
_ConnInfo = #{
|
||||
ConnInfo = #{
|
||||
peername := PeerName,
|
||||
sockname := SockName,
|
||||
clean_start := CleanStart,
|
||||
proto_name := ProtoName,
|
||||
proto_ver := ProtoVer,
|
||||
keepalive := Keepalive,
|
||||
connected_at := ConnectedAt,
|
||||
conn_props := ConnProps,
|
||||
receive_maximum := RcvMax,
|
||||
expiry_interval := ExpiryInterval
|
||||
receive_maximum := RcvMax
|
||||
}) ->
|
||||
Keepalive = maps:get(keepalive, ConnInfo, 0),
|
||||
ConnProps = maps:get(conn_props, ConnInfo, #{}),
|
||||
ExpiryInterval = maps:get(expiry_interval, ConnInfo, 0),
|
||||
with_basic_columns('client.connected',
|
||||
#{clientid => ClientId,
|
||||
username => Username,
|
||||
|
|
Loading…
Reference in New Issue