]> review.fuel-infra Code Review - packages/trusty/rabbitmq-server.git/blob
71c7ff45c567cec20b92d569d5ca8f9b72abc169
[packages/trusty/rabbitmq-server.git] /
1 -module(sockjs_session_sup).
2
3 -behaviour(supervisor).
4
5 -export([start_link/0, start_child/3]).
6 -export([init/1]).
7
8 %% --------------------------------------------------------------------------
9
10 %% -spec start_link() -> ignore | {'ok', pid()} | {'error', any()}.
11 start_link() ->
12      supervisor:start_link({local, ?MODULE}, ?MODULE, []).
13
14 init([]) ->
15     {ok, {{simple_one_for_one, 10, 10},
16           [{undefined, {sockjs_session, start_link, []},
17             transient, 5000, worker, [sockjs_session]}]}}.
18
19 start_child(SessionId, Service, Info) ->
20    supervisor:start_child(?MODULE, [SessionId, Service, Info]).