diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2010-07-06 14:43:51 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-07-06 14:43:51 +0100 |
commit | 602dd321af9badc83d930785d6dc5d6e9bbbe518 (patch) | |
tree | 8c60b32f9cd8fc107051039bd12549f108277acb /src/rabbit_connection_sup.erl | |
parent | ac3322f39ffdfc8da882ecaa55b5b811c889254e (diff) | |
download | rabbitmq-server-602dd321af9badc83d930785d6dc5d6e9bbbe518.tar.gz |
Now we have the reader, heartbeaters and queue_collector all under the same connection_supervisor, with one connection_supervisor per connection. Tests pass. The framing_channel, channel, writer and limiter are all still just linked as before, without supervision
Diffstat (limited to 'src/rabbit_connection_sup.erl')
-rw-r--r-- | src/rabbit_connection_sup.erl | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/rabbit_connection_sup.erl b/src/rabbit_connection_sup.erl new file mode 100644 index 00000000..db9dc3c9 --- /dev/null +++ b/src/rabbit_connection_sup.erl @@ -0,0 +1,52 @@ +%% 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_connection_sup). + +-behaviour(supervisor). + +-export([start_link/0]). + +-export([init/1]). + +-include("rabbit.hrl"). + +start_link() -> + supervisor:start_link(?MODULE, []). + +init([]) -> + {ok, {{one_for_all, 0, 1}, + [{reader, {rabbit_reader, start_link, []}, + permanent, ?MAX_WAIT, worker, [rabbit_reader]}, + {collector, {rabbit_reader_queue_collector, start_link, []}, + permanent, ?MAX_WAIT, worker, [rabbit_reader_queue_collector]} + ]}}. + |