use emqttd:reg_name/2 to replace name/1
This commit is contained in:
parent
0a29c8760e
commit
43165a5e8a
|
@ -85,10 +85,7 @@ mnesia(copy) ->
|
|||
%%------------------------------------------------------------------------------
|
||||
-spec start_link(atom(), pos_integer()) -> {ok, pid()} | ignore | {error, any()}.
|
||||
start_link(Pool, Id) ->
|
||||
gen_server2:start_link({local, name(Id)}, ?MODULE, [Pool, Id], []).
|
||||
|
||||
name(Id) ->
|
||||
list_to_atom("emqttd_sm_" ++ integer_to_list(Id)).
|
||||
gen_server2:start_link({local, emqttd:reg_name(?MODULE, Id)}, ?MODULE, [Pool, Id], []).
|
||||
|
||||
%%------------------------------------------------------------------------------
|
||||
%% @doc Start a session
|
||||
|
|
Loading…
Reference in New Issue