summaryrefslogtreecommitdiff
path: root/src/rabbit_framing_channel.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rabbit_framing_channel.erl')
-rw-r--r--src/rabbit_framing_channel.erl15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/rabbit_framing_channel.erl b/src/rabbit_framing_channel.erl
index bc1a2a08..31be1cf7 100644
--- a/src/rabbit_framing_channel.erl
+++ b/src/rabbit_framing_channel.erl
@@ -40,13 +40,14 @@
%%--------------------------------------------------------------------
start_link(StartFun, StartArgs) ->
- spawn_link(
- fun () ->
- %% we trap exits so that a normal termination of the
- %% channel or reader process terminates us too.
- process_flag(trap_exit, true),
- mainloop(apply(StartFun, StartArgs))
- end).
+ {ok, spawn_link(
+ fun () ->
+ %% we trap exits so that a normal termination of
+ %% the channel or reader process terminates us too.
+ process_flag(trap_exit, true),
+ {ok, ChannelPid} = apply(StartFun, StartArgs),
+ mainloop(ChannelPid)
+ end)}.
process(Pid, Frame) ->
Pid ! {frame, Frame},