summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2013-12-12 12:07:01 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2013-12-12 12:07:01 +0000
commit2c7344772b905f32d7c6b10bcfd52e60df7953c3 (patch)
treee33cd2a30c88c13d694213dfe28723e6fc08e875
parent9669e8f343cb2e5ece2428b0f2fb3557d93e8c82 (diff)
downloadrabbitmq-server-2c7344772b905f32d7c6b10bcfd52e60df7953c3.tar.gz
simplify (and stay below column limit)
-rw-r--r--src/rabbit_reader.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index bcf588f0..687e638a 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -634,12 +634,11 @@ create_channel(Channel, State) ->
channel_cleanup(ChPid, State = #v1{channel_count = ChannelCount}) ->
case get({ch_pid, ChPid}) of
undefined -> {undefined, State};
- {Channel, MRef} -> State1 = State#v1{channel_count = (ChannelCount - 1)},
- credit_flow:peer_down(ChPid),
+ {Channel, MRef} -> credit_flow:peer_down(ChPid),
erase({channel, Channel}),
erase({ch_pid, ChPid}),
erlang:demonitor(MRef, [flush]),
- {Channel, State1}
+ {Channel, State#v1{channel_count = ChannelCount - 1}}
end.
all_channels() -> [ChPid || {{ch_pid, ChPid}, _ChannelMRef} <- get()].