pubsub_adapter

This commit is contained in:
Feng 2016-08-08 14:06:52 +08:00
parent 8b6cc4d5f8
commit b3a48b937f
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ subscribers(Topic) ->
subscriptions(Subscriber) ->
with_pubsub(fun(PubSub) -> PubSub:subscriptions(Subscriber) end).
with_pubsub(Fun) -> Fun(conf(pubsub_adapter)).
with_pubsub(Fun) -> {ok, PubSub} = conf(pubsub_adapter), Fun(PubSub).
dump() -> with_pubsub(fun(PubSub) -> lists:append(PubSub:dump(), zenmq_router:dump()) end).

View File

@ -32,7 +32,7 @@ pubsub_pool() ->
hd([Pid || {pubsub_pool, Pid, _, _} <- supervisor:which_children(?MODULE)]).
init([Env]) ->
PubSub = emqttd:conf(pubsub_adapter),
{ok, PubSub} = emqttd:conf(pubsub_adapter),
PubSubMFA = {PubSub, start_link, [Env]},
PoolArgs = [pubsub, hash, pool_size(Env), PubSubMFA],
PubSubPoolSup = emqttd_pool_sup:spec(pubsub_pool, PoolArgs),