Force gc call emit_stats

This commit is contained in:
turtled 2017-05-26 16:44:44 +08:00
parent dc2e6ab53c
commit 0f7a66f810
2 changed files with 3 additions and 2 deletions

View File

@ -382,6 +382,6 @@ stop(Reason, State) ->
{stop, Reason, State}.
gc(State = #client_state{connection = Conn}) ->
Cb = fun() -> Conn:gc() end,
Cb = fun() -> Conn:gc(), emit_stats(State) end,
emqttd_gc:maybe_force_gc(#client_state.force_gc_count, State, Cb).

View File

@ -300,5 +300,6 @@ stop(Reason, State) ->
{stop, Reason, State}.
gc(State) ->
emqttd_gc:maybe_force_gc(#wsclient_state.force_gc_count, State).
Cb = fun() -> emit_stats(State) end,
emqttd_gc:maybe_force_gc(#wsclient_state.force_gc_count, State, Cb).