浏览代码

Format code

Feng 9 年之前
父节点
当前提交
1e91c0e220
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      src/emqttd_bridge.erl
  2. 2 2
      src/emqttd_pubsub.erl

+ 2 - 2
src/emqttd_bridge.erl

@@ -79,8 +79,8 @@ init([Pool, Id, Node, Topic, Options]) ->
             MQueue = emqttd_mqueue:new(qname(Node, Topic),
                                        [{max_len, State#state.max_queue_len}],
                                        emqttd_alarm:alarm_fun()),
-            {ok, State#state{pool = Pool, id = Id, mqueue = MQueue}, hibernate,
-             {backoff, 1000, 1000, 10000}};
+            {ok, State#state{pool = Pool, id = Id, mqueue = MQueue},
+             hibernate, {backoff, 1000, 1000, 10000}};
         false -> 
             {stop, {cannot_connect_node, Node}}
     end.

+ 2 - 2
src/emqttd_pubsub.erl

@@ -164,8 +164,8 @@ pick(Subscriber) ->
 
 init([Pool, Id, Env]) ->
     ?GPROC_POOL(join, Pool, Id),
-    {ok, #state{pool = Pool, id = Id, env = Env}, hibernate,
-     {backoff, 2000, 2000, 20000}}.
+    {ok, #state{pool = Pool, id = Id, env = Env},
+     hibernate, {backoff, 2000, 2000, 20000}}.
 
 handle_call({subscribe, Topic, Subscriber, Options}, _From, State) ->
     add_subscriber(Topic, Subscriber, Options),