diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2013-12-12 12:14:23 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-12-12 12:14:23 +0000 |
| commit | 6a861b01259c556e61f44fd4522453d3c227384d (patch) | |
| tree | 3b8cfa6c460b9c266abe972b777ff0dc6db04b78 /src | |
| parent | 0cbe22c51d63e305fb4e8a3eb5e4ff157c7f9eef (diff) | |
| download | rabbitmq-server-git-6a861b01259c556e61f44fd4522453d3c227384d.tar.gz | |
refactor: simplify & consistency
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_reader.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 550dac3f16..f78fb5515a 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -622,9 +622,9 @@ create_channel(Channel, State) -> Protocol, User, VHost, Capabilities, Collector}), MRef = erlang:monitor(process, ChPid), - State1 = State#v1{channel_count = (ChannelCount + 1)}, put({ch_pid, ChPid}, {Channel, MRef}), - {ok, {ChPid, AState}, State1}; + {ok, {ChPid, AState}, State#v1{ + channel_count = ChannelCount + 1}}; false -> {error, rabbit_misc:amqp_error( not_allowed, "number of channels opened (~w) has " "reached the negotiated channel_max (~w)", @@ -638,7 +638,8 @@ channel_cleanup(ChPid, State = #v1{channel_count = ChannelCount}) -> erase({channel, Channel}), erase({ch_pid, ChPid}), erlang:demonitor(MRef, [flush]), - {Channel, State#v1{channel_count = ChannelCount - 1}} + {Channel, State#v1{ + channel_count = ChannelCount - 1}} end. all_channels() -> [ChPid || {{ch_pid, ChPid}, _ChannelMRef} <- get()]. |
