Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Merge pull request #342 from rabbitmq/rabbitmq-common-341
Browse files Browse the repository at this point in the history
Special-case x-queue-type classic/undefined

(cherry picked from commit c5a8e62)
  • Loading branch information
michaelklishin committed Nov 16, 2019
1 parent 272511c commit 045bded
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/rabbit_misc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,17 @@ assert_args_equivalence1(Orig, New, Name, Key) ->
assert_field_equivalence(OrigTypeVal, NewTypeVal, Name, Key)
end.

%% Classic queues do not necessarily have an x-queue-type field associated with them
%% so we special-case that scenario here
%%
%% Fixes rabbitmq/rabbitmq-common#341
%%
assert_field_equivalence(_Orig, _Orig, _Name, _Key) ->
ok;
assert_field_equivalence(undefined, {longstr, <<"classic">>}, _Name, <<"x-queue-type">>) ->
ok;
assert_field_equivalence({longstr, <<"classic">>}, undefined, _Name, <<"x-queue-type">>) ->
ok;
assert_field_equivalence(Orig, New, Name, Key) ->
equivalence_fail(Orig, New, Name, Key).

Expand Down

0 comments on commit 045bded

Please sign in to comment.