summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2009-08-14 17:23:26 +0100
committerMatthias Radestock <matthias@lshift.net>2009-08-14 17:23:26 +0100
commit4fbe8f7ae4ee7e56bfea864d97b3f9a849207a8b (patch)
treeba9ffa44240ae2b87bf5bcd180b2399f2158cf1a /src
parente886c8fe159393bd04d70b3489453b0254b25620 (diff)
parent31c9a6fa23b285268dd6d886b14bb0b1f1a42cbf (diff)
downloadrabbitmq-server-git-4fbe8f7ae4ee7e56bfea864d97b3f9a849207a8b.tar.gz
merge bug21066 into default
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl4
-rw-r--r--src/rabbit_reader.erl2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 58b9423460..16b7c938ca 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -157,6 +157,10 @@ handle_cast({conserve_memory, Conserve}, State) ->
State#ch.writer_pid, #'channel.flow'{active = not(Conserve)}),
noreply(State).
+handle_info({'EXIT', WriterPid, Reason = {writer, send_failed, _Error}},
+ State = #ch{writer_pid = WriterPid}) ->
+ State#ch.reader_pid ! {channel_exit, State#ch.channel, Reason},
+ {stop, normal, State};
handle_info({'EXIT', _Pid, Reason}, State) ->
{stop, Reason, State};
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 426b99eba1..7be9281258 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -286,7 +286,7 @@ mainloop(Parent, Deb, State = #v1{sock= Sock, recv_ref = Ref}) ->
%% since this termination is initiated by our parent it is
%% probably more important to exit quickly.
exit(Reason);
- {'EXIT', _Pid, E = {writer, send_failed, _Error}} ->
+ {channel_exit, _Chan, E = {writer, send_failed, _Error}} ->
throw(E);
{channel_exit, Channel, Reason} ->
mainloop(Parent, Deb, handle_channel_exit(Channel, Reason, State));