mirror of
https://github.com/seriyps/mtproto_proxy.git
synced 2026-08-04 07:08:10 +00:00
Fix timeout state switch
This commit is contained in:
parent
d2fab355bf
commit
8b2e3906cc
3 changed files with 15 additions and 3 deletions
|
|
@ -42,6 +42,13 @@ Stop proxy started in background
|
|||
./_build/default/rel/mtp_proxy/bin/mtp_proxy stop
|
||||
```
|
||||
|
||||
Settings
|
||||
--------
|
||||
|
||||
See `src/mtproto_proxy.app.src`.
|
||||
|
||||
Secret key will be printed on start.
|
||||
|
||||
Helpers
|
||||
-------
|
||||
|
||||
|
|
|
|||
|
|
@ -230,9 +230,10 @@ handle_upstream_header(Endpoint, UpCodec, S) ->
|
|||
EndpointStr = inet:ntoa(Endpoint),
|
||||
lager:info("Connected to ~s:~p", [EndpointStr, 443]),
|
||||
ok = gen_tcp:send(Sock, <<239>>),
|
||||
{ok, S#state{stage = tunnel,
|
||||
down_sock = Sock,
|
||||
up_codec = UpCodec}};
|
||||
{ok, switch_timer(S#state{stage = tunnel,
|
||||
down_sock = Sock,
|
||||
up_codec = UpCodec},
|
||||
hibernate)};
|
||||
{error, _Reason} = Err ->
|
||||
Err
|
||||
end.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@
|
|||
stdlib
|
||||
]},
|
||||
{env,[
|
||||
{init_timeout_sec, 60},
|
||||
{hibernate_timeout_sec, 60},
|
||||
{ready_timeout_sec, 1200},
|
||||
|
||||
{ip, {0, 0, 0, 0}},
|
||||
{ports, [{mtp_handler, 4430}]},
|
||||
{num_acceptors, 60},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue