Adapt to the types used by string:lexemes/2

This commit is contained in:
Michael Klishin 2021-02-24 20:41:32 +03:00
parent 7ba2bde260
commit f183ee4609
No known key found for this signature in database
GPG Key ID: E80EDCFA0CDB21EE
1 changed files with 4 additions and 5 deletions

View File

@ -345,13 +345,13 @@ declare_fast_reply_to(_) ->
declare_fast_reply_to_v1(EncodedBin) -> declare_fast_reply_to_v1(EncodedBin) ->
%% the the original encoding function %% the the original encoding function
case rabbit_direct_reply_to:decode_reply_to_v1(EncodedBin) of case rabbit_direct_reply_to:decode_reply_to_v1(EncodedBin) of
{error, _} ->
not_found;
{ok, V1Pid, V1Key} -> {ok, V1Pid, V1Key} ->
Msg = {declare_fast_reply_to, V1Key}, Msg = {declare_fast_reply_to, V1Key},
rabbit_misc:with_exit_handler( rabbit_misc:with_exit_handler(
rabbit_misc:const(not_found), rabbit_misc:const(not_found),
fun() -> gen_server2:call(V1Pid, Msg, infinity) end) fun() -> gen_server2:call(V1Pid, Msg, infinity) end);
{error, _} ->
not_found
end. end.
-spec send_credit_reply(pid(), non_neg_integer()) -> 'ok'. -spec send_credit_reply(pid(), non_neg_integer()) -> 'ok'.
@ -1400,8 +1400,7 @@ handle_method(#'basic.consume'{queue = <<"amq.rabbitmq.reply-to">>,
end, end,
%% Precalculate both suffix and key %% Precalculate both suffix and key
{Key, Suffix} = rabbit_direct_reply_to:compute_key_and_suffix_v2(self()), {Key, Suffix} = rabbit_direct_reply_to:compute_key_and_suffix_v2(self()),
rabbit_log:debug("amq.rabbitmq.reply-to key: ~p, suffix: ~p", [Key, Suffix]), Consumer = {CTag, Suffix, Key},
Consumer = {CTag, Suffix, binary_to_list(Key)},
State1 = State#ch{reply_consumer = Consumer}, State1 = State#ch{reply_consumer = Consumer},
case NoWait of case NoWait of
true -> {noreply, State1}; true -> {noreply, State1};