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 | 93a8fe6cf2e16814108a8c5f4c1d62e7a38113ac (patch) | |
| tree | 882daacd5f921478b50573a1a179d30a329f2b57 | |
| parent | 03c206117f0879b8f66022edd0acf18eda55dccc (diff) | |
| download | rabbitmq-server-git-93a8fe6cf2e16814108a8c5f4c1d62e7a38113ac.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 8ba5874061..b2218fa030 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; |
