Skip to content

Commit

Permalink
Merge pull request #223 from keynslug/fix/conn-counter
Browse files Browse the repository at this point in the history
fix(stats): count connections and subscriptions independently
  • Loading branch information
keynslug authored Aug 1, 2023
2 parents db41314 + 98adbe5 commit 5e32f40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emqtt_bench.erl
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ connect(Parent, N, PubSub, Opts) ->
ContinueFn = fun() -> loop(Parent, N, Client, PubSub, loop_opts(AllOpts)) end,
case ConnRet of
{ok, _Props} ->
inc_counter(connect_succ),
Res =
case PubSub of
conn -> ok;
Expand All @@ -619,7 +620,6 @@ connect(Parent, N, PubSub, Opts) ->
{error, _SubscribeError} ->
maybe_retry(Parent, N, PubSub, Opts, ContinueFn);
_ ->
inc_counter(connect_succ),
PubSub =:= sub andalso inc_counter(sub),
loop(Parent, N, Client, PubSub, loop_opts(AllOpts))
end;
Expand Down

0 comments on commit 5e32f40

Please sign in to comment.