feat(olp): don't hibernate conn proc when overloaded

This commit is contained in:
William Yang 2021-10-04 10:44:53 +02:00
parent e9710ade14
commit 166f02edc4
1 changed files with 6 additions and 1 deletions

View File

@ -323,7 +323,12 @@ recvloop(Parent, State = #state{idle_timeout = IdleTimeout}) ->
handle_recv(Msg, Parent, State)
after
IdleTimeout + 100 ->
hibernate(Parent, cancel_stats_timer(State))
case emqx_olp:is_overloaded() of
true ->
recvloop(Parent, State);
false ->
hibernate(Parent, cancel_stats_timer(State))
end
end.
handle_recv({system, From, Request}, Parent, State) ->