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

View File

@ -107,7 +107,10 @@ mnesia(copy) ->
Id :: pos_integer(), Id :: pos_integer(),
Opts :: list(). Opts :: list().
start_link(Id, Opts) -> start_link(Id, Opts) ->
gen_server2:start_link(?MODULE, [Id, Opts], []). gen_server2:start_link({local, name(Id)}, ?MODULE, [Id, Opts], []).
name(Id) ->
list_to_atom("emqttd_pubsub_" ++ integer_to_list(Id)).
%%------------------------------------------------------------------------------ %%------------------------------------------------------------------------------
%% @doc Create topic. Notice That this transaction is not protected by pubsub pool %% @doc Create topic. Notice That this transaction is not protected by pubsub pool