summaryrefslogtreecommitdiff
path: root/src/rabbit_channel.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rabbit_channel.erl')
-rw-r--r--src/rabbit_channel.erl12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index d34c5a72..8bc53b4a 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -220,13 +220,11 @@ handle_cast({deliver, ConsumerTag, AckRequired, Msg},
ok = internal_deliver(WriterPid, true, ConsumerTag, DeliveryTag, Msg),
noreply(State1#ch{next_tag = DeliveryTag + 1});
-handle_cast({conserve_memory, Conserve}, State = #ch{state = starting}) ->
- case Conserve of
- true -> noreply(State);
- false -> ok = rabbit_writer:send_command(State#ch.writer_pid,
- #'channel.open_ok'{}),
- noreply(State#ch{state = running})
- end;
+handle_cast({conserve_memory, true}, State = #ch{state = starting}) ->
+ noreply(State);
+handle_cast({conserve_memory, false}, State = #ch{state = starting}) ->
+ ok = rabbit_writer:send_command(State#ch.writer_pid, #'channel.open_ok'{}),
+ noreply(State#ch{state = running});
handle_cast({conserve_memory, Conserve}, State = #ch{state = running}) ->
flow_control(not Conserve, State);
handle_cast({conserve_memory, _Conserve}, State) ->