summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_reader.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 83622a9f97..840f430e06 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -594,21 +594,22 @@ handle_frame(Type, Channel, Payload, State) ->
unexpected_frame(Type, Channel, Payload, State).
process_frame(Frame, Channel, State) ->
- {ChPid, AState} = case get({channel, Channel}) of
+ ChKey = {channel, Channel},
+ {ChPid, AState} = case get(ChKey) of
undefined -> create_channel(Channel, State);
Other -> Other
end,
case rabbit_command_assembler:process(Frame, AState) of
{ok, NewAState} ->
- put({channel, Channel}, {ChPid, NewAState}),
+ put(ChKey, {ChPid, NewAState}),
post_process_frame(Frame, ChPid, State);
{ok, Method, NewAState} ->
rabbit_channel:do(ChPid, Method),
- put({channel, Channel}, {ChPid, NewAState}),
+ put(ChKey, {ChPid, NewAState}),
post_process_frame(Frame, ChPid, State);
{ok, Method, Content, NewAState} ->
rabbit_channel:do_flow(ChPid, Method, Content),
- put({channel, Channel}, {ChPid, NewAState}),
+ put(ChKey, {ChPid, NewAState}),
post_process_frame(Frame, ChPid, control_throttle(State));
{error, Reason} ->
{error, Reason}