diff options
| -rw-r--r-- | src/rabbit_channel.erl | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 19104bcb90..ca2782c77d 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -111,16 +111,14 @@ init(ProxyPid, [ReaderPid, WriterPid, Username, VHost]) -> consumer_mapping = dict:new()}. handle_message({method, Method, Content}, State) -> - try - case handle_method(Method, Content, State) of - {reply, Reply, NewState} -> - ok = rabbit_writer:send_command(NewState#ch.writer_pid, Reply), - NewState; - {noreply, NewState} -> - NewState; - stop -> - exit(normal) - end + try handle_method(Method, Content, State) of + {reply, Reply, NewState} -> + ok = rabbit_writer:send_command(NewState#ch.writer_pid, Reply), + NewState; + {noreply, NewState} -> + NewState; + stop -> + exit(normal) catch exit:{amqp, Error, Explanation, none} -> terminate({amqp, Error, Explanation, |
