summaryrefslogtreecommitdiff
path: root/src/rabbit_sup.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rabbit_sup.erl')
-rw-r--r--src/rabbit_sup.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rabbit_sup.erl b/src/rabbit_sup.erl
index 2c5e5112..97613d17 100644
--- a/src/rabbit_sup.erl
+++ b/src/rabbit_sup.erl
@@ -34,7 +34,7 @@
-behaviour(supervisor).
-export([start_link/0, start_child/1, start_child/2, start_child/3,
- start_restartable_child/1, start_restartable_child/2]).
+ start_restartable_child/1, start_restartable_child/2, stop_child/1]).
-export([init/1]).
@@ -69,5 +69,11 @@ start_restartable_child(Mod, Args) ->
transient, infinity, supervisor, [rabbit_restartable_sup]}),
ok.
+stop_child(ChildId) ->
+ case supervisor:terminate_child(?SERVER, ChildId) of
+ ok -> supervisor:delete_child(?SERVER, ChildId);
+ E -> E
+ end.
+
init([]) ->
{ok, {{one_for_all, 0, 1}, []}}.