mirror of
https://github.com/seriyps/mtproto_proxy.git
synced 2026-08-04 15:19:47 +00:00
Stop ranch listeners in 'prep_stop', not 'stop' application callback
This commit is contained in:
parent
bf01459be5
commit
e9f999a151
1 changed files with 5 additions and 2 deletions
|
|
@ -8,7 +8,7 @@
|
|||
-behaviour(application).
|
||||
|
||||
%% Application callbacks
|
||||
-export([start/2, stop/1, start_proxy/1]).
|
||||
-export([start/2, prep_stop/1, stop/1, start_proxy/1]).
|
||||
-define(APP, mtproto_proxy).
|
||||
|
||||
%%====================================================================
|
||||
|
|
@ -23,8 +23,11 @@ start(_StartType, _StartArgs) ->
|
|||
Res.
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
stop(_State) ->
|
||||
prep_stop(State) ->
|
||||
[stop_proxy(Where) || Where <- application:get_env(?APP, ports, [])],
|
||||
State.
|
||||
|
||||
stop(_State) ->
|
||||
ok.
|
||||
|
||||
%%====================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue