diff options
author | Michael Klishin <michael@rabbitmq.com> | 2013-12-12 15:43:27 +0400 |
---|---|---|
committer | Michael Klishin <michael@rabbitmq.com> | 2013-12-12 15:43:27 +0400 |
commit | 13de94db5d2ef73e4ae711e7579d1bb82f0915cd (patch) | |
tree | a08beb8956511cd6b8b21346c0131222c1554dc2 | |
parent | 7b5064b8c0b6d721f76b5b942a1c210322ffe377 (diff) | |
download | rabbitmq-server-13de94db5d2ef73e4ae711e7579d1bb82f0915cd.tar.gz |
If channel pid is not in the process dict, don't decrement channel_count
-rw-r--r-- | src/rabbit_reader.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 782900a9..1717faff 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -633,10 +633,10 @@ create_channel(Channel, State) -> end. channel_cleanup(ChPid, State = #v1{channel_count = ChannelCount}) -> - State1 = State#v1{channel_count = (ChannelCount - 1)}, case get({ch_pid, ChPid}) of - undefined -> {undefined, State1}; - {Channel, MRef} -> credit_flow:peer_down(ChPid), + undefined -> {undefined, State}; + {Channel, MRef} -> State1 = State#v1{channel_count = (ChannelCount - 1)}, + credit_flow:peer_down(ChPid), erase({channel, Channel}), erase({ch_pid, ChPid}), erlang:demonitor(MRef, [flush]), |