use emqttd:reg_name/2 to replace name/1

This commit is contained in:
Feng 2016-01-17 20:00:46 +08:00
parent 5bfd3a784e
commit 1cbdc5e9e4
1 changed files with 1 additions and 4 deletions

View File

@ -53,10 +53,7 @@ start_link() ->
%%%=============================================================================
-spec start_link(atom(), pos_integer()) -> {ok, pid()} | ignore | {error, any()}.
start_link(Pool, Id) ->
gen_server:start_link({local, name(Id)}, ?MODULE, [Pool, Id], []).
name(Id) ->
list_to_atom(lists:concat([?MODULE, "_", integer_to_list(Id)])).
gen_server:start_link({local, emqttd:reg_name(?MODULE, Id)}, ?MODULE, [Pool, Id], []).
%%------------------------------------------------------------------------------
%% @doc Submit work to pooler