From 35ebb978da3975d9d201fd85d35b4e7e0befd569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 1 Aug 2018 13:10:16 +0200 Subject: Remove R16 compatibility Ranch is now made for and tested on 18+ only. --- doc/src/guide/introduction.asciidoc | 2 +- doc/src/guide/listeners.asciidoc | 8 -------- src/ranch.erl | 5 +---- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/doc/src/guide/introduction.asciidoc b/doc/src/guide/introduction.asciidoc index ac27862..301df21 100644 --- a/doc/src/guide/introduction.asciidoc +++ b/doc/src/guide/introduction.asciidoc @@ -15,7 +15,7 @@ with socket programming and TCP protocols. Ranch is tested and supported on Linux, FreeBSD, OSX and Windows. -Ranch is developed for Erlang/OTP R16B+. +Ranch is developed for Erlang/OTP 18+. There are known issues with the SSL application found in Erlang/OTP 18.3.2 and 18.3.3. These versions are therefore not supported. diff --git a/doc/src/guide/listeners.asciidoc b/doc/src/guide/listeners.asciidoc index 21a6838..e8ca694 100644 --- a/doc/src/guide/listeners.asciidoc +++ b/doc/src/guide/listeners.asciidoc @@ -169,14 +169,6 @@ from the connect function for the transport or the underlying socket library called on the passed in socket. You should connect the socket in `{active, false}` mode, as well. -Note, however, that because of a bug in SSL, you cannot change ownership of an -SSL listen socket prior to R16. Ranch will catch the error thrown, but the -owner of the SSL socket will remain as whatever process created the socket. -However, this will not affect accept behaviour unless the owner process dies, -in which case the socket is closed. Therefore, to use this feature with SSL -with an erlang release prior to R16, ensure that the SSL socket is opened in a -persistant process. - === Limiting the number of concurrent connections The `max_connections` transport option allows you to limit the number diff --git a/src/ranch.erl b/src/ranch.erl index bc31fdf..ed52b73 100644 --- a/src/ranch.erl +++ b/src/ranch.erl @@ -96,10 +96,7 @@ start_listener(Ref, Transport, TransOpts0, Protocol, ProtoOpts) Children = supervisor:which_children(Pid), {_, AcceptorsSup, _, _} = lists:keyfind(ranch_acceptors_sup, 1, Children), - %%% Note: the catch is here because SSL crashes when you change - %%% the controlling process of a listen socket because of a bug. - %%% The bug will be fixed in R16. - catch Transport:controlling_process(Socket, AcceptorsSup); + Transport:controlling_process(Socket, AcceptorsSup); _ -> ok end, -- cgit v1.2.3