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

Commit

Permalink
Special-case x-queue-type classic/undefined
Browse files Browse the repository at this point in the history
Fixes #341
  • Loading branch information
lukebakken committed Nov 15, 2019
1 parent 98db805 commit 0c8724b
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 0c8724b

Please sign in to comment.