Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMickaël Rémond <mickael.remond@process-one.net>2006-12-16 01:18:04 +0300
committerMickaël Rémond <mickael.remond@process-one.net>2006-12-16 01:18:04 +0300
commit76522293a5b807858d0fc090dc6ed4e9eb0d7006 (patch)
treefe718c88792e8e1274fa449a63fd6cf794c1a07a /src/mod_echo.erl
parentc265da885acd43c214145b4da27bc343c6c2d936 (diff)
* src/mod_echo.erl: The mod_echo can now be stopped without errors.
This is not a major issue, but can mislead other developers learning from this example and test module (Thanks to Magnus Henoch) (EJAB-163). SVN Revision: 696
Diffstat (limited to 'src/mod_echo.erl')
-rw-r--r--src/mod_echo.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_echo.erl b/src/mod_echo.erl
index d37becb6a..c2b466ee5 100644
--- a/src/mod_echo.erl
+++ b/src/mod_echo.erl
@@ -52,7 +52,9 @@ start(Host, Opts) ->
stop(Host) ->
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
gen_server:call(Proc, stop),
- supervisor:stop_child(ejabberd_sup, Proc).
+ supervisor:terminate_child(ejabberd_sup, Proc),
+ supervisor:delete_child(ejabberd_sup, Proc).
+
%%====================================================================
%% gen_server callbacks