Просмотр исходного кода

Remove R16 compatibility

Ranch is now made for and tested on 18+ only.
Loïc Hoguin 7 лет назад
Родитель
Сommit
35ebb978da
3 измененных файлов с 2 добавлено и 13 удалено
  1. 1 1
      doc/src/guide/introduction.asciidoc
  2. 0 8
      doc/src/guide/listeners.asciidoc
  3. 1 4
      src/ranch.erl

+ 1 - 1
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 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
 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.
 18.3.2 and 18.3.3. These versions are therefore not supported.

+ 0 - 8
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
 called on the passed in socket. You should connect the socket in
 `{active, false}` mode, as well.
 `{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
 === Limiting the number of concurrent connections
 
 
 The `max_connections` transport option allows you to limit the number
 The `max_connections` transport option allows you to limit the number

+ 1 - 4
src/ranch.erl

@@ -96,10 +96,7 @@ start_listener(Ref, Transport, TransOpts0, Protocol, ProtoOpts)
 					Children = supervisor:which_children(Pid),
 					Children = supervisor:which_children(Pid),
 					{_, AcceptorsSup, _, _}
 					{_, AcceptorsSup, _, _}
 						= lists:keyfind(ranch_acceptors_sup, 1, Children),
 						= 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
 					ok
 			end,
 			end,