diff options
| author | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-01-24 13:32:33 +0000 |
|---|---|---|
| committer | Francesco Mazzoli <francesco@rabbitmq.com> | 2012-01-24 13:32:33 +0000 |
| commit | 9f8aaa304f33d69782eeb19f5fdffd81b52644e7 (patch) | |
| tree | d91c4d5f7e6fd826a22082b46f42d939f4c2cb0f /src | |
| parent | 124e6c2a7b898be38aae00a245d36e553106dd95 (diff) | |
| download | rabbitmq-server-git-9f8aaa304f33d69782eeb19f5fdffd81b52644e7.tar.gz | |
Protocol error instead of warning when routing through inert exchange.
I originally raised protocol errors in bind/unbind as well but that defies
the purpose of this fixes since if a queue is bound to an exchange with invalid
type the boot sequence fails since it tries to re-bind the queue.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_exchange_type_inert.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rabbit_exchange_type_inert.erl b/src/rabbit_exchange_type_inert.erl index 393bb045fe..97b39b22f1 100644 --- a/src/rabbit_exchange_type_inert.erl +++ b/src/rabbit_exchange_type_inert.erl @@ -30,7 +30,10 @@ description() -> serialise_events() -> false. -route(_, _) -> ok. +route(#exchange{name = Name}, _) -> + rabbit_misc:protocol_error( + command_invalid, + "cannot route message through inert exchange ~p", [Name]). validate(_X) -> ok. create(_Tx, _X) -> ok. |
