mochiweb -> cowboy
This commit is contained in:
parent
09b5535260
commit
d516b8c241
|
@ -166,8 +166,8 @@ shutdown() ->
|
||||||
shutdown(Reason) ->
|
shutdown(Reason) ->
|
||||||
emqx_logger:error("emqx shutdown for ~s", [Reason]),
|
emqx_logger:error("emqx shutdown for ~s", [Reason]),
|
||||||
emqx_plugins:unload(),
|
emqx_plugins:unload(),
|
||||||
lists:foreach(fun application:stop/1, [emqx, ekka, mochiweb, esockd, gproc]).
|
lists:foreach(fun application:stop/1, [emqx, ekka, cowboy, esockd, gproc]).
|
||||||
|
|
||||||
reboot() ->
|
reboot() ->
|
||||||
lists:foreach(fun application:start/1, [gproc, esockd, mochiweb, ekka, emqx]).
|
lists:foreach(fun application:start/1, [gproc, esockd, cowboy, ekka, emqx]).
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ start_link() ->
|
||||||
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
|
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
|
||||||
|
|
||||||
%% @doc Start a MQTT/WebSocket Connection.
|
%% @doc Start a MQTT/WebSocket Connection.
|
||||||
-spec(start_connection(pid(), mochiweb_request:request()) -> {ok, pid()}).
|
-spec(start_connection(pid(), cowboy_req:req()) -> {ok, pid()}).
|
||||||
start_connection(WsPid, Req) ->
|
start_connection(WsPid, Req) ->
|
||||||
supervisor:start_child(?MODULE, [WsPid, Req]).
|
supervisor:start_child(?MODULE, [WsPid, Req]).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue