Return ok rather than ignore
This commit is contained in:
parent
ad5b954f1d
commit
243e6b3571
|
@ -294,12 +294,12 @@ do_inc_recv(?PACKET(?DISCONNECT)) ->
|
|||
do_inc_recv(?PACKET(?AUTH)) ->
|
||||
inc('packets.auth.received');
|
||||
do_inc_recv(_Packet) ->
|
||||
ignore.
|
||||
ok.
|
||||
|
||||
%% @doc Inc packets sent. Will not count $SYS PUBLISH.
|
||||
-spec(inc_sent(emqx_mqtt_types:packet()) -> ok | ignore).
|
||||
-spec(inc_sent(emqx_mqtt_types:packet()) -> ok).
|
||||
inc_sent(?PUBLISH_PACKET(_QoS, <<"$SYS/", _/binary>>, _, _)) ->
|
||||
ignore;
|
||||
ok;
|
||||
inc_sent(Packet) ->
|
||||
inc('packets.sent'),
|
||||
do_inc_sent(Packet).
|
||||
|
@ -341,7 +341,7 @@ do_inc_sent(?PACKET(?DISCONNECT)) ->
|
|||
do_inc_sent(?PACKET(?AUTH)) ->
|
||||
inc('packets.auth.sent');
|
||||
do_inc_sent(_Packet) ->
|
||||
ignore.
|
||||
ok.
|
||||
|
||||
%%------------------------------------------------------------------------------
|
||||
%% gen_server callbacks
|
||||
|
|
Loading…
Reference in New Issue