fix: TopicFilter may modified by `client.subscribe` hook
This commit is contained in:
parent
802a36c670
commit
afec6fa2f6
|
@ -796,19 +796,19 @@ do_gen_reason_codes(Acc, [], []) ->
|
||||||
lists:reverse(Acc);
|
lists:reverse(Acc);
|
||||||
do_gen_reason_codes(
|
do_gen_reason_codes(
|
||||||
Acc,
|
Acc,
|
||||||
[{_TF, ?RC_SUCCESS} | RestCheckedTF],
|
[{_, ?RC_SUCCESS} | RestTF],
|
||||||
[{_TF, NRC} | RestTFWithNRC]
|
[{_, NRC} | RestWithNRC]
|
||||||
) ->
|
) ->
|
||||||
%% will passing through `process_subscribe/2`
|
%% will passing through `process_subscribe/2`
|
||||||
%% use NRC to override IintialRC
|
%% use NRC to override IintialRC
|
||||||
do_gen_reason_codes([NRC | Acc], RestCheckedTF, RestTFWithNRC);
|
do_gen_reason_codes([NRC | Acc], RestTF, RestWithNRC);
|
||||||
do_gen_reason_codes(
|
do_gen_reason_codes(
|
||||||
Acc,
|
Acc,
|
||||||
[{_TF, InitialRC} | RestChecked],
|
[{_, InitialRC} | Rest],
|
||||||
RestTFWithNRC
|
RestWithNRC
|
||||||
) ->
|
) ->
|
||||||
%% InitialRC is not `RC_SUCCESS`, use it.
|
%% InitialRC is not `RC_SUCCESS`, use it.
|
||||||
do_gen_reason_codes([InitialRC | Acc], RestChecked, RestTFWithNRC).
|
do_gen_reason_codes([InitialRC | Acc], Rest, RestWithNRC).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Process Unsubscribe
|
%% Process Unsubscribe
|
||||||
|
|
Loading…
Reference in New Issue