Skip to content

Commit

Permalink
Merge pull request #38 from blokovi/qos2ack
Browse files Browse the repository at this point in the history
Fix QoS 2 PUBREC counter
  • Loading branch information
ioolkos authored May 6, 2020
2 parents 252bdcf + bc2ef5d commit fd0bc49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mqtt_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ stats({pubrec_in, MsgId}, State) ->
T2 = os:timestamp(),
T1 = maps:get({outgoing, MsgId}, State),
mzb_metrics:notify({"mqtt.publisher.qos2.pub_out_to_pubrec_in.latency", histogram}, positive(timer:now_diff(T2, T1))),
mzb_metrics:notify({"mqtt.publisher.qos2.pubrec.in.total"}, 1),
mzb_metrics:notify({"mqtt.publisher.qos2.pubrec.in.total", counter}, 1),
mzb_metrics:notify({"mqtt.publisher.qos2.pubrec.waiting", counter}, -1),
NewState = maps:update({outgoing, MsgId}, T2, State),
NewState;
Expand Down

0 comments on commit fd0bc49

Please sign in to comment.