diff --git a/src/behaviors/emqttb_behavior_sub.erl b/src/behaviors/emqttb_behavior_sub.erl index 8391b7f..c02f189 100644 --- a/src/behaviors/emqttb_behavior_sub.erl +++ b/src/behaviors/emqttb_behavior_sub.erl @@ -210,7 +210,7 @@ verify_sequence(#{ number_of_gaps := NGaps, gap_size := GapSize, number_of_repea [{_, OldSeqNo}] -> logger:info("Repeat detected: ~p ~p; ~p", [OldSeqNo, SeqNo, Key]), emqttb_metrics:counter_inc(NRepeats, 1), - emqttb_metrics:rolling_average_observe(RepeatSize, SeqNo - OldSeqNo + 1) + emqttb_metrics:rolling_average_observe(RepeatSize, OldSeqNo - SeqNo + 1) end, ets:insert(?seq_tab, {Key, SeqNo}).