Return ok rather than ignore

This commit is contained in:
zhouzb 2019-11-12 09:23:25 +08:00 committed by turtleDeng
parent ad5b954f1d
commit 243e6b3571
1 changed files with 4 additions and 4 deletions

View File

@ -294,12 +294,12 @@ do_inc_recv(?PACKET(?DISCONNECT)) ->
do_inc_recv(?PACKET(?AUTH)) -> do_inc_recv(?PACKET(?AUTH)) ->
inc('packets.auth.received'); inc('packets.auth.received');
do_inc_recv(_Packet) -> do_inc_recv(_Packet) ->
ignore. ok.
%% @doc Inc packets sent. Will not count $SYS PUBLISH. %% @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>>, _, _)) -> inc_sent(?PUBLISH_PACKET(_QoS, <<"$SYS/", _/binary>>, _, _)) ->
ignore; ok;
inc_sent(Packet) -> inc_sent(Packet) ->
inc('packets.sent'), inc('packets.sent'),
do_inc_sent(Packet). do_inc_sent(Packet).
@ -341,7 +341,7 @@ do_inc_sent(?PACKET(?DISCONNECT)) ->
do_inc_sent(?PACKET(?AUTH)) -> do_inc_sent(?PACKET(?AUTH)) ->
inc('packets.auth.sent'); inc('packets.auth.sent');
do_inc_sent(_Packet) -> do_inc_sent(_Packet) ->
ignore. ok.
%%------------------------------------------------------------------------------ %%------------------------------------------------------------------------------
%% gen_server callbacks %% gen_server callbacks