Przeglądaj źródła

Merge with EMQ X project

Feng Lee 8 lat temu
rodzic
commit
735211fd02
2 zmienionych plików z 4 dodań i 7 usunięć
  1. 3 6
      src/emqx_sup.erl
  2. 1 1
      src/emqx_ws.erl

+ 3 - 6
src/emqx_sup.erl

@@ -36,17 +36,14 @@
 start_link() ->
     supervisor:start_link({local, ?SUPERVISOR}, ?MODULE, []).
 
--spec(start_child(atom(), worker | supervisor) -> startchild_ret()).
-start_child(Mod, Type) when Type == worker orelse Type == supervisor ->
-    start_child(?CHILD(Mod, Type)).
 
 -spec(start_child(supervisor:child_spec()) -> startchild_ret()).
 start_child(ChildSpec) when is_tuple(ChildSpec) ->
     supervisor:start_child(?SUPERVISOR, ChildSpec).
 
--spec(start_child(Mod::atom(), Type :: worker | supervisor) -> {ok, pid()}).
-start_child(Mod, Type) when is_atom(Mod) and is_atom(Type) ->
-    supervisor:start_child(?MODULE, ?CHILD(Mod, Type)).
+-spec(start_child(atom(), worker | supervisor) -> startchild_ret()).
+start_child(Mod, Type) when Type == worker orelse Type == supervisor ->
+    start_child(?CHILD(Mod, Type)).
 
 -spec(stop_child(supervisor:child_id()) -> ok | {error, any()}).
 stop_child(ChildId) ->

+ 1 - 1
src/emqx_ws.erl

@@ -18,7 +18,7 @@
 
 -author("Feng Lee <feng@emqtt.io>").
 
--include("emqx_protocol.hrl").
+-include("emqx_mqtt.hrl").
 
 -import(proplists, [get_value/3]).