chore: set channel info once
This commit is contained in:
parent
cded5fc6cf
commit
282e6ff218
|
@ -601,8 +601,7 @@ handle_msg({event, disconnected}, State = #state{channel = Channel}) ->
|
||||||
{ok, State};
|
{ok, State};
|
||||||
handle_msg({event, _Other}, State = #state{channel = Channel}) ->
|
handle_msg({event, _Other}, State = #state{channel = Channel}) ->
|
||||||
ClientId = emqx_channel:info(clientid, Channel),
|
ClientId = emqx_channel:info(clientid, Channel),
|
||||||
emqx_cm:set_chan_info(ClientId, info(State)),
|
emqx_cm:insert_channel_info(ClientId, info(State), stats(State)),
|
||||||
emqx_cm:set_chan_stats(ClientId, stats(State)),
|
|
||||||
{ok, State};
|
{ok, State};
|
||||||
handle_msg({timeout, TRef, TMsg}, State) ->
|
handle_msg({timeout, TRef, TMsg}, State) ->
|
||||||
handle_timeout(TRef, TMsg, State);
|
handle_timeout(TRef, TMsg, State);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
-module(emqx_gateway_impl).
|
-module(emqx_gateway_impl).
|
||||||
|
|
||||||
-include("include/emqx_gateway.hrl").
|
-include("emqx_gateway.hrl").
|
||||||
|
|
||||||
-type state() :: map().
|
-type state() :: map().
|
||||||
-type reason() :: any().
|
-type reason() :: any().
|
||||||
|
|
Loading…
Reference in New Issue