From cef5c164fe09d12befde719fd086736e710e55cd Mon Sep 17 00:00:00 2001 From: Matthew Sackman Date: Mon, 5 Jul 2010 16:35:15 +0100 Subject: Ensure that after asking the writer to exit, we unlink from it. We're usually in the channel when we ask it to exit anyway, which has trap_exits on, so the selective receive is appropriate. In the erlang client we're in amqp_network_connection, which also has trap_exits on, so it's fine there too. However, the point is to ensure the *writer* isn't destroyed early by the channel exiting too quickly, not the other way around, and without turning on trap_exits in the writer. --- src/rabbit_writer.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rabbit_writer.erl b/src/rabbit_writer.erl index 3d10dc12..233d7291 100644 --- a/src/rabbit_writer.erl +++ b/src/rabbit_writer.erl @@ -149,6 +149,7 @@ send_command_and_notify(W, Q, ChPid, MethodRecord, Content) -> shutdown(W) -> W ! shutdown, + rabbit_misc:unlink_and_capture_exit(W), ok. %--------------------------------------------------------------------------- -- cgit v1.2.1