diff options
| author | Alvaro Videla <videlalvaro@gmail.com> | 2015-07-21 16:13:41 +0200 |
|---|---|---|
| committer | Alvaro Videla <videlalvaro@gmail.com> | 2015-07-21 16:13:41 +0200 |
| commit | 4352e0c23fdc7ae87c8eb5e63204f29746bf64c1 (patch) | |
| tree | 8f9c08f4abc914f26f3aa5c166a23726b8f7d4b1 | |
| parent | 556a81d5227bce8fcd1488afda6ada124f3fbd0d (diff) | |
| download | rabbitmq-server-git-4352e0c23fdc7ae87c8eb5e63204f29746bf64c1.tar.gz | |
expand_shortcut errors were not handled correctly
| -rw-r--r-- | src/rabbit_channel.erl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 1e3d516097..7866ac34d8 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -439,10 +439,10 @@ handle_cast({method, Method, Content, Flow}, flow -> credit_flow:ack(Reader); noflow -> ok end, - Method1 = expand_shortcuts(Method, State), - {Method2, Content1} = rabbit_channel_interceptor:intercept_in( - Method1, Content, IState), - try handle_method(Method2, Content1, State) of + + try handle_method(rabbit_channel_interceptor:intercept_in( + expand_shortcuts(Method, State), Content, IState), + State) of {reply, Reply, NewState} -> ok = send(Reply, NewState), noreply(NewState); @@ -452,7 +452,7 @@ handle_cast({method, Method, Content, Flow}, {stop, normal, State} catch exit:Reason = #amqp_error{} -> - MethodName = rabbit_misc:method_record_type(Method2), + MethodName = rabbit_misc:method_record_type(Method), handle_exception(Reason#amqp_error{method = MethodName}, State); _:Reason -> {stop, {Reason, erlang:get_stacktrace()}, State} @@ -824,6 +824,9 @@ record_confirms([], State) -> record_confirms(MXs, State = #ch{confirmed = C}) -> State#ch{confirmed = [MXs | C]}. +handle_method({Method, Content}, State) -> + handle_method(Method, Content, State). + handle_method(#'channel.open'{}, _, State = #ch{state = starting}) -> %% Don't leave "starting" as the state for 5s. TODO is this TRTTD? State1 = State#ch{state = running}, |
