This commit is contained in:
Feng 2015-10-12 21:06:18 +08:00
parent 4825591565
commit 6209d47aae
1 changed files with 4 additions and 1 deletions

View File

@ -85,7 +85,10 @@ mnesia(copy) ->
%%------------------------------------------------------------------------------ %%------------------------------------------------------------------------------
-spec start_link(Id :: pos_integer()) -> {ok, pid()} | ignore | {error, any()}. -spec start_link(Id :: pos_integer()) -> {ok, pid()} | ignore | {error, any()}.
start_link(Id) -> start_link(Id) ->
gen_server2:start_link(?MODULE, [Id], []). gen_server2:start_link({local, name(Id)}, ?MODULE, [Id], []).
name(Id) ->
list_to_atom("emqttd_sm_" ++ integer_to_list(Id)).
%%------------------------------------------------------------------------------ %%------------------------------------------------------------------------------
%% @doc Pool name. %% @doc Pool name.