Fix set_chan_stats incorrect
This commit is contained in:
parent
4ba92b6a3b
commit
983973c841
|
@ -655,7 +655,7 @@ handle_call(Req, Channel) ->
|
|||
handle_cast({register, Attrs, Stats}, #channel{client = #{client_id := ClientId}}) ->
|
||||
ok = emqx_cm:register_channel(ClientId),
|
||||
emqx_cm:set_chan_attrs(ClientId, Attrs),
|
||||
emqx_cm:set_chan_attrs(ClientId, Stats);
|
||||
emqx_cm:set_chan_stats(ClientId, Stats);
|
||||
|
||||
handle_cast(Msg, Channel) ->
|
||||
?LOG(error, "Unexpected cast: ~p", [Msg]),
|
||||
|
|
|
@ -100,7 +100,7 @@ t_cm(_) ->
|
|||
emqtt:subscribe(C, <<"mytopic">>, 0),
|
||||
ct:sleep(1200),
|
||||
Stats = emqx_cm:get_chan_stats(ClientId),
|
||||
?assertEqual(1, proplists:get_value(subscriptions, Stats)),
|
||||
?assertEqual(1, proplists:get_value(subscriptions_cnt, Stats)),
|
||||
emqx_zone:set_env(external, idle_timeout, IdleTimeout).
|
||||
|
||||
t_cm_registry(_) ->
|
||||
|
|
Loading…
Reference in New Issue