Fix 'badarg' bug with duplicate subscriptions (#1943)
This commit is contained in:
parent
32d3826440
commit
3879dcdf59
|
@ -337,7 +337,6 @@ handle_cast({From, #subscribe{topic = Topic, subpid = SubPid, subid = SubId, sub
|
||||||
true ->
|
true ->
|
||||||
case ets:lookup_element(?SUBOPTION, {Topic, Subscriber}, 2) =:= SubOpts of
|
case ets:lookup_element(?SUBOPTION, {Topic, Subscriber}, 2) =:= SubOpts of
|
||||||
true ->
|
true ->
|
||||||
io:format("Ets: ~p, SubOpts: ~p", [ets:lookup_element(?SUBOPTION, Topic, Subscriber), SubOpts]),
|
|
||||||
gen_server:reply(From, ok),
|
gen_server:reply(From, ok),
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
false ->
|
false ->
|
||||||
|
|
|
@ -60,9 +60,7 @@ open_session(SessAttrs = #{clean_start := true, client_id := ClientId, conn_pid
|
||||||
emqx_sm_locker:trans(ClientId, CleanStart);
|
emqx_sm_locker:trans(ClientId, CleanStart);
|
||||||
|
|
||||||
open_session(SessAttrs = #{clean_start := false,
|
open_session(SessAttrs = #{clean_start := false,
|
||||||
client_id := ClientId,
|
client_id := ClientId}) ->
|
||||||
max_inflight := MaxInflight,
|
|
||||||
topic_alias_maximum := TopicAliasMaximum}) ->
|
|
||||||
ResumeStart = fun(_) ->
|
ResumeStart = fun(_) ->
|
||||||
case resume_session(ClientId, SessAttrs) of
|
case resume_session(ClientId, SessAttrs) of
|
||||||
{ok, SPid} ->
|
{ok, SPid} ->
|
||||||
|
|
Loading…
Reference in New Issue