fix(mgmt): remove the `will_msg` field from the client API

This commit is contained in:
firest 2022-08-15 10:22:18 +08:00
parent e8dc7bc1b0
commit dfa63ff3b1
1 changed files with 2 additions and 2 deletions

View File

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