瀏覽代碼

Update the registered name of pool sup.

Feng Lee 7 年之前
父節點
當前提交
7fe3d59c28
共有 3 個文件被更改,包括 6 次插入5 次删除
  1. 2 2
      src/emqx_broker_sup.erl
  2. 2 1
      src/emqx_pool_sup.erl
  3. 2 2
      src/emqx_router_sup.erl

+ 2 - 2
src/emqx_broker_sup.erl

@@ -30,8 +30,8 @@ start_link() ->
 init([]) ->
     %% Broker pool
     PoolSize = emqx_vm:schedulers() * 2,
-    BrokerPool = emqx_pool_sup:spec(emqx_broker_pool,
-                                    [broker, hash, PoolSize,
+    BrokerPool = emqx_pool_sup:spec(broker_pool,
+                                    [emqx_broker_pool, hash, PoolSize,
                                      {emqx_broker, start_link, []}]),
     %% Shared subscription
     SharedSub = #{id       => shared_sub,

+ 2 - 1
src/emqx_pool_sup.erl

@@ -37,7 +37,8 @@ spec(ChildId, Args) ->
 start_link(Pool, Type, MFA) ->
     start_link(Pool, Type, emqx_vm:schedulers(), MFA).
 
--spec(start_link(atom() | tuple(), atom(), pos_integer(), mfa()) -> {ok, pid()} | {error, term()}).
+-spec(start_link(atom() | tuple(), atom(), pos_integer(), mfa())
+      -> {ok, pid()} | {error, term()}).
 start_link(Pool, Type, Size, MFA) when is_atom(Pool) ->
     supervisor:start_link({local, Pool}, ?MODULE, [Pool, Type, Size, MFA]);
 start_link(Pool, Type, Size, MFA) ->

+ 2 - 2
src/emqx_router_sup.erl

@@ -32,8 +32,8 @@ init([]) ->
                modules  => [emqx_router_helper]},
 
     %% Router pool
-    RouterPool = emqx_pool_sup:spec(emqx_router_pool,
-                                    [router, hash, emqx_vm:schedulers(),
+    RouterPool = emqx_pool_sup:spec(router_pool,
+                                    [emqx_router_pool, hash, emqx_vm:schedulers(),
                                      {emqx_router, start_link, []}]),
     {ok, {{one_for_all, 0, 1}, [Helper, RouterPool]}}.