summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-09-08 18:12:40 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-09-08 18:12:40 +0100
commit155ce4ae12e01819d71232b76ec88196a31c4d06 (patch)
tree349ebeb6c04c4eb3fe52dd593ac5d2d6db73a0ae
parenta88163e4a07fbbdef2010c0308ce7d7ab9dd5c40 (diff)
downloadrabbitmq-server-155ce4ae12e01819d71232b76ec88196a31c4d06.tar.gz
Use monitor, not link
-rw-r--r--src/rabbit_channel_sup_sup.erl2
-rw-r--r--src/rabbit_reader.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_channel_sup_sup.erl b/src/rabbit_channel_sup_sup.erl
index d1938805..f7249221 100644
--- a/src/rabbit_channel_sup_sup.erl
+++ b/src/rabbit_channel_sup_sup.erl
@@ -54,7 +54,7 @@ start_link() ->
start_channel(Pid, Args) ->
{ok, ChSupPid, _} = Result = supervisor2:start_child(Pid, [Args]),
- link(ChSupPid),
+ erlang:monitor(process, ChSupPid),
Result.
%%----------------------------------------------------------------------------
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index a21961b5..adf0d1b6 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -339,7 +339,7 @@ mainloop(Deb, State = #v1{parent = Parent, sock= Sock, recv_ref = Ref}) ->
throw(E);
{channel_exit, ChannelOrFrPid, Reason} ->
mainloop(Deb, handle_channel_exit(ChannelOrFrPid, Reason, State));
- {'EXIT', ChSupPid, Reason} ->
+ {'DOWN', _MRef, process, ChSupPid, Reason} ->
mainloop(Deb, handle_dependent_exit(ChSupPid, Reason, State));
terminate_connection ->
State;