fix(test): for paho qos3

This commit is contained in:
DDDHuang 2022-01-18 18:02:13 +08:00
parent 578199ad3a
commit 040d04c9fb
1 changed files with 3 additions and 2 deletions

View File

@ -881,8 +881,9 @@ inc_outgoing_stats(Packet = ?PACKET(Type)) ->
end, end,
emqx_metrics:inc_sent(Packet). emqx_metrics:inc_sent(Packet).
inc_qos_stats(Type, #mqtt_packet{header = #mqtt_packet_header{qos = QoS}}) -> inc_qos_stats(Type, #mqtt_packet{header = #mqtt_packet_header{qos = QoS}}) when ?IS_QOS(QoS) ->
inc_counter(inc_qos_stats_key(Type, QoS), 1). inc_counter(inc_qos_stats_key(Type, QoS), 1);
inc_qos_stats(_, _) -> ok.
inc_qos_stats_key(send_msg, ?QOS_0) -> 'send_msg.qos0'; inc_qos_stats_key(send_msg, ?QOS_0) -> 'send_msg.qos0';
inc_qos_stats_key(send_msg, ?QOS_1) -> 'send_msg.qos1'; inc_qos_stats_key(send_msg, ?QOS_1) -> 'send_msg.qos1';