Skip to content

Commit

Permalink
fix(stats): count connections and subscriptions independently
Browse files Browse the repository at this point in the history
  • Loading branch information
keynslug committed Aug 1, 2023
1 parent db41314 commit 98adbe5
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 98adbe5

Please sign in to comment.