Merge pull request #8721 from lafirest/fix/clients_api

fix(mgmt): remove the `will_msg` field from the client API
This commit is contained in:
lafirest 2022-08-15 15:31:56 +08:00 committed by GitHub
commit fba3ed6a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
# 5.0.6
## Bug fixes
* Remove the needless `will_msg` field from the client API. [#8721](https://github.com/emqx/emqx/pull/8721)
# 5.0.5
## Bug fixes

View File

@ -538,7 +538,6 @@ fields(client) ->
})},
{username, hoconsc:mk(binary(), #{desc => <<"User name of client when connecting">>})},
{mountpoint, hoconsc:mk(binary(), #{desc => <<"Topic mountpoint">>})},
{will_msg, hoconsc:mk(binary(), #{desc => <<"Client will message">>})},
{zone,
hoconsc:mk(binary(), #{
desc =>
@ -885,7 +884,8 @@ format_channel_info({_, ClientInfo0, ClientStats}) ->
[memory, next_pkt_id, total_heap_size],
maps:from_list(ClientStats)
),
ClientInfoMap0 = maps:fold(fun take_maps_from_inner/3, #{}, ClientInfo2),
ClientInfo3 = maps:remove(will_msg, ClientInfo2),
ClientInfoMap0 = maps:fold(fun take_maps_from_inner/3, #{}, ClientInfo3),
{IpAddress, Port} = peername_dispart(maps:get(peername, ClientInfoMap0)),
Connected = maps:get(conn_state, ClientInfoMap0) =:= connected,
ClientInfoMap1 = maps:merge(StatsMap, ClientInfoMap0),