From 7938ae607576d43522e9afef551bedfba2153f90 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sun, 9 Jan 2011 11:46:20 +0000 Subject: ensure connections terminate when channel-related processes exit abnormally When processes related to the channel, such as the writer and limiter, terminate abnormally, the channel_sup terminates the channel process with reason 'shutdown'. The reader musn't treat that as a controlled termination. The other path to a 'shutdown' termination of a channel process is the shutdown of the application. But the reader will be shut down first there since it is started after the channel_sup_sup. Hence it will never see a 'shutdown' termination from a channel in that scenario. --- src/rabbit_reader.erl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 74e5fc77..6eb88d41 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -520,8 +520,6 @@ maybe_close(State) -> State. termination_kind(normal) -> controlled; -termination_kind(shutdown) -> controlled; -termination_kind({shutdown, _Term}) -> controlled; termination_kind(_) -> uncontrolled. handle_frame(Type, 0, Payload, -- cgit v1.2.1