diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2013-12-12 12:17:51 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-12-12 12:17:51 +0000 |
| commit | e82494447e900485b673a0a2ded12d080d964839 (patch) | |
| tree | 87412bbd768016209b73f2f0cdcb88838d4794a7 | |
| parent | 6a861b01259c556e61f44fd4522453d3c227384d (diff) | |
| download | rabbitmq-server-git-e82494447e900485b673a0a2ded12d080d964839.tar.gz | |
refactor: simplify and reduce distance to 'default'
| -rw-r--r-- | src/rabbit_reader.erl | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index f78fb5515a..7e74aead6e 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -678,17 +678,10 @@ handle_frame(Type, Channel, Payload, State) -> process_frame(Frame, Channel, State) -> ChKey = {channel, Channel}, - ChRes = case get(ChKey) of - undefined -> - case create_channel(Channel, State) of - {ok, ChVal, ConnState} -> - {ok, ChVal, ConnState}; - {error, E} -> - {error, E} - end; - Other -> {ok, Other, State} - end, - case ChRes of + case (case get(ChKey) of + undefined -> create_channel(Channel, State); + Other -> {ok, Other, State} + end) of {error, Error} -> handle_exception(State, Channel, Error); {ok, {ChPid, AState}, State1} -> |
