Merge pull request #2710 from emqx/master
merge from master to release-3.2
This commit is contained in:
commit
155eb82283
|
@ -296,8 +296,8 @@ websocket_info({binary, Data}, State) ->
|
||||||
websocket_info({shutdown, Reason}, State) ->
|
websocket_info({shutdown, Reason}, State) ->
|
||||||
shutdown(Reason, State);
|
shutdown(Reason, State);
|
||||||
|
|
||||||
websocket_info({stop, Reason}, State) ->
|
websocket_info(stop, State) ->
|
||||||
{stop, State#state{shutdown = Reason}};
|
{stop, State};
|
||||||
|
|
||||||
websocket_info(Info = {'EXIT', SessionPid, Reason}, State = #state{proto_state = ProtoState}) ->
|
websocket_info(Info = {'EXIT', SessionPid, Reason}, State = #state{proto_state = ProtoState}) ->
|
||||||
case emqx_protocol:session(ProtoState) of
|
case emqx_protocol:session(ProtoState) of
|
||||||
|
@ -363,12 +363,12 @@ ensure_stats_timer(State) ->
|
||||||
State.
|
State.
|
||||||
|
|
||||||
shutdown(Reason = {shutdown, _}, State) ->
|
shutdown(Reason = {shutdown, _}, State) ->
|
||||||
self() ! {stop, Reason},
|
self() ! stop,
|
||||||
{ok, State};
|
{ok, State#state{shutdown = Reason}};
|
||||||
shutdown(Reason, State) ->
|
shutdown(Reason, State) ->
|
||||||
%% Fix the issue#2591(https://github.com/emqx/emqx/issues/2591#issuecomment-500278696)
|
%% Fix the issue#2591(https://github.com/emqx/emqx/issues/2591#issuecomment-500278696)
|
||||||
self() ! {stop, {shutdown, Reason}},
|
self() ! stop,
|
||||||
{ok, State}.
|
{ok, State#state{shutdown = {shutdown, Reason}}}.
|
||||||
|
|
||||||
wsock_stats() ->
|
wsock_stats() ->
|
||||||
[{Key, emqx_pd:get_counter(Key)} || Key <- ?SOCK_STATS].
|
[{Key, emqx_pd:get_counter(Key)} || Key <- ?SOCK_STATS].
|
||||||
|
|
Loading…
Reference in New Issue