diff options
author | Emile Joubert <emile@rabbitmq.com> | 2010-06-24 16:52:50 +0100 |
---|---|---|
committer | Emile Joubert <emile@rabbitmq.com> | 2010-06-24 16:52:50 +0100 |
commit | fbc63971530f171c2c90b144037e21983d0cdf91 (patch) | |
tree | 882daacd5f921478b50573a1a179d30a329f2b57 | |
parent | df0bfa412229cb8d65bc7f06e2c2a3704193be26 (diff) | |
download | rabbitmq-server-fbc63971530f171c2c90b144037e21983d0cdf91.tar.gz |
Rebase bug21848
-rw-r--r-- | src/rabbit_reader.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 8ba58740..b2218fa0 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -486,10 +486,18 @@ handle_frame(Type, Channel, Payload, State) -> closing -> %% According to the spec, after sending a %% channel.close we must ignore all frames except + %% channel.close and channel.close_ok. In the + %% event of a channel.close, we should send back a %% channel.close_ok. case AnalyzedFrame of {method, 'channel.close_ok', _} -> erase({channel, Channel}); + {method, 'channel.close', _} -> + %% We're already closing this channel, so + %% there's no cleanup to do (notify + %% queues, etc.) + ok = rabbit_writer:send_command(State#v1.sock, + #'channel.close_ok'{}); _ -> ok end, State; |