Просмотр исходного кода

Don't register name for pool_sup

Feng Lee 9 лет назад
Родитель
Сommit
f166143cd0
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/emqttd_pool_sup.erl

+ 3 - 3
src/emqttd_pool_sup.erl

@@ -41,10 +41,10 @@ start_link(Pool, Type, MFA) ->
 
 -spec(start_link(atom(), atom(), pos_integer(), mfa()) -> {ok, pid()} | {error, any()}).
 start_link(Pool, Type, Size, MFA) ->
-    supervisor:start_link({local, sup_name(Pool)}, ?MODULE, [Pool, Type, Size, MFA]).
+    supervisor:start_link(?MODULE, [Pool, Type, Size, MFA]).
 
-sup_name(Pool) when is_atom(Pool) ->
-    list_to_atom(atom_to_list(Pool) ++ "_pool_sup").
+%% sup_name(Pool) when is_atom(Pool) ->
+%%    list_to_atom(atom_to_list(Pool) ++ "_pool_sup").
 
 init([Pool, Type, Size, {M, F, Args}]) ->
     ensure_pool(Pool, Type, [{size, Size}]),