diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2010-06-21 17:42:33 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2010-06-21 17:42:33 +0100 |
| commit | 9ee6d80c13ed614901fca989bfeb78eb475e594c (patch) | |
| tree | 516f7324a08886a2dd4bed11d2c15dd8c462a2aa | |
| parent | 4acc3d91479106f0c7158705023f8b0f0bd884ac (diff) | |
| parent | fc839abbcdb4e6b0f3f95a31df2deca51be447f7 (diff) | |
| download | rabbitmq-server-git-9ee6d80c13ed614901fca989bfeb78eb475e594c.tar.gz | |
Merged bug 21848 into amqp_0_9_1
| -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 c6b7f19fab..3e03ae0c36 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -490,10 +490,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; |
