24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-18 22:15:20 +02:00

Correctly set gen_server's name

This commit is contained in:
Evgeniy Khramtsov 2017-01-16 11:43:35 +03:00
parent 65d352d5de
commit 0078a3b904

View File

@ -35,7 +35,8 @@
%%% API
%%%===================================================================
init(Host, Opts) ->
case gen_server:start_link({local, ?MODULE}, ?MODULE, [Host, Opts], []) of
Name = gen_mod:get_module_proc(Host, ?MODULE),
case gen_server:start_link({local, Name}, ?MODULE, [Host, Opts], []) of
{ok, _Pid} ->
ok;
Err ->