Skip to content
Permalink
Browse files
Use ssl:handshake/2 unconditionally to see when it is first available
  • Loading branch information
etrepum committed Jan 10, 2019
1 parent 2699ae8 commit d7179cfd461b1d1d06581db63f8c7d9db8bacd79
Showing 1 changed file with 3 additions and 3 deletions.
@@ -88,9 +88,9 @@ transport_accept(ListenSocket) ->
gen_tcp:accept(ListenSocket, ?ACCEPT_TIMEOUT).

finish_accept({ssl, Socket}) ->
case ssl:ssl_accept(Socket, ?SSL_HANDSHAKE_TIMEOUT) of
ok ->
{ok, {ssl, Socket}};
case ssl:handshake(Socket, ?SSL_HANDSHAKE_TIMEOUT) of
{ok, SslSocket} ->
{ok, {ssl, SslSocket}};
{error, _} = Err ->
Err
end;

0 comments on commit d7179cf

Please sign in to comment.