From babc6213f9e7190ee21295535383151847772331 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 10 Jan 2018 16:51:59 +0100 Subject: [PATCH] Update mod_grafite to start correctly in recent ejabberd (#234) --- mod_grafite/src/mod_grafite.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod_grafite/src/mod_grafite.erl b/mod_grafite/src/mod_grafite.erl index e707b39..3ec4945 100644 --- a/mod_grafite/src/mod_grafite.erl +++ b/mod_grafite/src/mod_grafite.erl @@ -54,13 +54,15 @@ start(Host, Opts) -> StatsDH = gen_mod:get_opt(statsdhost, Opts, fun(X) -> X end, "localhost"), {ok, StatsDHost} = getaddrs(StatsDH), StatsDPort = gen_mod:get_opt(statsdport, Opts, fun(X) -> X end, 8125), - register(?PROCNAME, spawn(?MODULE, udp_loop_start, [#state{host = StatsDHost, port = StatsDPort}])). + register(?PROCNAME, spawn(?MODULE, udp_loop_start, [#state{host = StatsDHost, port = StatsDPort}])), + ok. stop(Host) -> [ejabberd_hooks:delete(Hook, Host, ?MODULE, Hook, 20) || Hook <- ?HOOKS], [ejabberd_hooks:delete(Hook, Host, ?MODULE, Hook, 20) - || Hook <- ?GLOBAL_HOOKS]. + || Hook <- ?GLOBAL_HOOKS], + ok. depends(_Host, _Opts) -> [].