Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 9f28ac4

Browse files
author
Daniil Fedotov
committed
Emit stats when gen_server2 process is started.
When a process exists, there should be a stats record for this process.
1 parent 8345fca commit 9f28ac4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gen_server2.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,9 +1382,9 @@ stats_funs() ->
13821382
{fun emit_stats/1, fun stop_stats/1}
13831383
end.
13841384

1385-
init_stats(State) ->
1385+
init_stats(State = #gs2_state{ emit_stats_fun = EmitStatsFun }) ->
13861386
StateWithInitTimer = rabbit_event:init_stats_timer(State, #gs2_state.timer),
1387-
next_stats_timer(StateWithInitTimer).
1387+
next_stats_timer(EmitStatsFun(StateWithInitTimer)).
13881388

13891389
next_stats_timer(State) ->
13901390
ensure_stats_timer(rabbit_event:reset_stats_timer(State, #gs2_state.timer)).

0 commit comments

Comments
 (0)