From 8e11845f8798552fe6c21b0fd95e5922451afc34 Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Tue, 28 Aug 2018 07:36:22 +0800 Subject: [PATCH] Remove ignore_loop_deliver option --- etc/emqx.conf | 6 ------ priv/emqx.schema | 1 - src/emqx_frame.erl | 2 +- src/emqx_session.erl | 7 ++++--- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/etc/emqx.conf b/etc/emqx.conf index c35b1d0f7..b582f9003 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -605,12 +605,6 @@ zone.external.max_awaiting_rel = 100 ## Value: Duration zone.external.await_rel_timeout = 60s -## Whether to ignore loop delivery of messages. -## -## Value: true | false -## Default: false -zone.external.ignore_loop_deliver = false - ## Default session expiry interval for MQTT V3.1.1 connections. ## ## Value: Duration diff --git a/priv/emqx.schema b/priv/emqx.schema index 765363607..af4935c33 100644 --- a/priv/emqx.schema +++ b/priv/emqx.schema @@ -769,7 +769,6 @@ end}. %% @doc Ignore loop delivery of messages {mapping, "zone.$name.ignore_loop_deliver", "emqx.zones", [ - {default, false}, {datatype, {enum, [true, false]}} ]}. diff --git a/src/emqx_frame.erl b/src/emqx_frame.erl index 59a195e33..c1cc34d59 100644 --- a/src/emqx_frame.erl +++ b/src/emqx_frame.erl @@ -331,7 +331,7 @@ parse_variable_byte_integer(<<0:1, Len:7, Rest/binary>>, Multiplier, Value) -> {Value + Len * Multiplier, Rest}. parse_topic_filters(subscribe, Bin) -> - [{Topic, #{rh => Rh, rap => Rap, nl => Nl, qos => QoS, rc => 0, subid => 0}} + [{Topic, #{rh => Rh, rap => Rap, nl => Nl, qos => QoS, rc => 0}} || <> <= Bin]; parse_topic_filters(unsubscribe, Bin) -> diff --git a/src/emqx_session.erl b/src/emqx_session.erl index db7e80a9b..a96fac8f3 100644 --- a/src/emqx_session.erl +++ b/src/emqx_session.erl @@ -611,9 +611,10 @@ code_change(_OldVsn, State, _Extra) -> %% Internal functions %%------------------------------------------------------------------------------ -with_subid(#{'Subscription-Identifier' := SubId}, Opts) -> - maps:put(subid, SubId, Opts); -with_subid(_Props, Opts) -> Opts. +with_subid(#{'Subscription-Identifier' := SubId}, SubOpts) -> + maps:put(subid, SubId, SubOpts); +with_subid(_Props, SubOpts) -> + SubOpts. suback(_From, undefined, _ReasonCodes) -> ignore;