From 753bdcd0ce88868fb723e792d91c9fdd59ea3c9b Mon Sep 17 00:00:00 2001 From: Matthew Sackman Date: Tue, 6 Jul 2010 18:31:56 +0100 Subject: And now the channel, writer, limiter and framing_channel are also all suitably supervisored --- src/rabbit_channel_sup_sup.erl | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/rabbit_channel_sup_sup.erl (limited to 'src/rabbit_channel_sup_sup.erl') diff --git a/src/rabbit_channel_sup_sup.erl b/src/rabbit_channel_sup_sup.erl new file mode 100644 index 00000000..42064709 --- /dev/null +++ b/src/rabbit_channel_sup_sup.erl @@ -0,0 +1,49 @@ +%% The contents of this file are subject to the Mozilla Public License +%% Version 1.1 (the "License"); you may not use this file except in +%% compliance with the License. You may obtain a copy of the License at +%% http://www.mozilla.org/MPL/ +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +%% License for the specific language governing rights and limitations +%% under the License. +%% +%% The Original Code is RabbitMQ. +%% +%% The Initial Developers of the Original Code are LShift Ltd, +%% Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd. +%% +%% Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd, +%% Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd +%% are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial +%% Technologies LLC, and Rabbit Technologies Ltd. +%% +%% Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift +%% Ltd. Portions created by Cohesive Financial Technologies LLC are +%% Copyright (C) 2007-2010 Cohesive Financial Technologies +%% LLC. Portions created by Rabbit Technologies Ltd are Copyright +%% (C) 2007-2010 Rabbit Technologies Ltd. +%% +%% All Rights Reserved. +%% +%% Contributor(s): ______________________________________. +%% + +-module(rabbit_channel_sup_sup). + +-behaviour(supervisor2). + +-export([start_link/0, start_channel/2]). + +-export([init/1]). + +start_link() -> + supervisor2:start_link(?MODULE, []). + +init([]) -> + {ok, {{simple_one_for_one_terminate, 0, 1}, + [{channel_sup, {rabbit_channel_sup, start_link, []}, + transient, infinity, supervisor, [rabbit_channel_sup]}]}}. + +start_channel(Pid, Args) -> + supervisor2:start_child(Pid, Args). -- cgit v1.2.1 From ec5bd9bf2b447d322a7b37d354de8895c9202e0d Mon Sep 17 00:00:00 2001 From: Matthew Sackman Date: Wed, 21 Jul 2010 16:46:41 +0100 Subject: Fixed channel shutdown mechanisms --- src/rabbit_channel_sup_sup.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rabbit_channel_sup_sup.erl') diff --git a/src/rabbit_channel_sup_sup.erl b/src/rabbit_channel_sup_sup.erl index 42064709..2fab8678 100644 --- a/src/rabbit_channel_sup_sup.erl +++ b/src/rabbit_channel_sup_sup.erl @@ -43,7 +43,7 @@ start_link() -> init([]) -> {ok, {{simple_one_for_one_terminate, 0, 1}, [{channel_sup, {rabbit_channel_sup, start_link, []}, - transient, infinity, supervisor, [rabbit_channel_sup]}]}}. + temporary, infinity, supervisor, [rabbit_channel_sup]}]}}. start_channel(Pid, Args) -> supervisor2:start_child(Pid, Args). -- cgit v1.2.1