Skip to content

Commit f24b70d

Browse files
committed
Bump version to 0.8.2; add compatibility Ranch 1.8/2.0
1 parent fc9ec1d commit f24b70d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/mtp_handler.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-behaviour(ranch_protocol).
1111

1212
%% API
13-
-export([start_link/3, send/2]).
13+
-export([start_link/3, start_link/4, send/2]).
1414
-export([hex/1, unhex/1]).
1515
-export([keys_str/0]).
1616

@@ -68,6 +68,10 @@
6868
start_link(Ref, Transport, Opts) ->
6969
{ok, proc_lib:spawn_link(?MODULE, ranch_init, [{Ref, Transport, Opts}])}.
7070

71+
%% Ranch 1.x compatibility shim (socket is obtained via ranch:handshake/1 in 2.x)
72+
start_link(Ref, _Socket, Transport, Opts) ->
73+
start_link(Ref, Transport, Opts).
74+
7175
keys_str() ->
7276
[{Name, Port, hex(Secret)}
7377
|| {Name, Port, Secret} <- application:get_env(?APP, ports, [])].

src/mtproto_proxy.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{application, mtproto_proxy,
22
[{description, "High-performance Telegram MTProto proxy server"},
3-
{vsn, "0.8.1"},
3+
{vsn, "0.8.2"},
44
{registered, []},
55
{mod, { mtproto_proxy_app, []}},
66
{applications,

0 commit comments

Comments
 (0)