aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2010-10-13 10:55:35 +0200
committerChristophe Romain <christophe.romain@process-one.net>2010-10-13 10:55:35 +0200
commita73d451576a85731eb21916d273a1e0d9c8f6798 (patch)
tree9f642322d84fa9296134a54db0396f8f10c0cef1 /src
parentMerge branch 'master' of git+ssh://git@gitorious.process-one.net/ejabberd/mai... (diff)
make http-bind restartable (thanks to Andreas Köhler)(EJAB-1318)
Diffstat (limited to 'src')
-rw-r--r--src/web/mod_http_bind.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/web/mod_http_bind.erl b/src/web/mod_http_bind.erl
index 32d702eb0..a8b47019c 100644
--- a/src/web/mod_http_bind.erl
+++ b/src/web/mod_http_bind.erl
@@ -120,7 +120,7 @@ start(_Host, _Opts) ->
% mod_http_bind is already started so it will not be started again
ok;
{error, Error} ->
- {'EXIT', {start_child_error, Error}}
+ exit({start_child_error, Error})
end.
stop(_Host) ->
@@ -128,7 +128,13 @@ stop(_Host) ->
ok ->
ok;
{error, Error} ->
- {'EXIT', {terminate_child_error, Error}}
+ exit({terminate_child_error, Error})
+ end,
+ case supervisor:delete_child(ejabberd_sup, ejabberd_http_bind_sup) of
+ ok ->
+ ok;
+ {error, Error2} ->
+ exit({delete_child_error, Error2})
end.
setup_database() ->