diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_reader.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 8a3e001512..d4acc697b1 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -327,7 +327,7 @@ handle_other({conserve_resources, Source, Conserve}, end, Throttle1 = Throttle#throttle{alarmed_by = CR1}, control_throttle(State#v1{throttle = Throttle1}); -handle_other({channel_closing, ChPid}, State) -> +handle_other({channel_closing, ChPid}, State = #v1{channel_count = ChannelCount}) -> ok = rabbit_channel:ready_for_close(ChPid), channel_cleanup(ChPid), maybe_close(control_throttle(State#v1{channel_count = (ChannelCount - 1)})); @@ -707,7 +707,8 @@ process_frame(Frame, Channel, State) -> end end. -post_process_frame({method, 'channel.close_ok', _}, ChPid, State) -> +post_process_frame({method, 'channel.close_ok', _}, ChPid, + State = #v1{channel_count = ChannelCount}) -> channel_cleanup(ChPid), %% This is not strictly necessary, but more obviously %% correct. Also note that we do not need to call maybe_close/1 |
