stop_listeners

This commit is contained in:
Feng 2015-08-24 22:20:32 +08:00
parent 741ebf2ae1
commit b08c39db52
1 changed files with 4 additions and 9 deletions

View File

@ -31,7 +31,7 @@
-behaviour(application). -behaviour(application).
%% Application callbacks %% Application callbacks
-export([start/2, prep_stop/1, stop/1]). -export([start/2, stop/1]).
-define(PRINT_MSG(Msg), io:format(Msg)). -define(PRINT_MSG(Msg), io:format(Msg)).
@ -132,10 +132,9 @@ worker_spec(Name, Opts) ->
{Name, start_link, [Opts]}, {Name, start_link, [Opts]},
permanent, 10000, worker, [Name]}. permanent, 10000, worker, [Name]}.
%% close all listeners first... -spec stop(State :: term()) -> term().
prep_stop(State) -> stop(_State) ->
stop_listeners(), stop_listeners().
State.
stop_listeners() -> stop_listeners() ->
%% ensure that esockd applications is started? %% ensure that esockd applications is started?
@ -147,7 +146,3 @@ stop_listeners() ->
emqttd:close_listeners(Listeners) emqttd:close_listeners(Listeners)
end. end.
-spec stop(State :: term()) -> term().
stop(_State) ->
ok.