diff options
author | Dan Gudmundsson <[email protected]> | 2010-04-16 07:20:49 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-04-16 07:20:49 +0000 |
commit | 5eaee4202e77086422317f3c24f719a52491ecc7 (patch) | |
tree | d663fcad553ec425737c5de0cb7e667926ac86c8 /lib | |
parent | f39289291f9fcbb7b813584edb7d465e480be212 (diff) | |
download | otp-5eaee4202e77086422317f3c24f719a52491ecc7.tar.gz otp-5eaee4202e77086422317f3c24f719a52491ecc7.tar.bz2 otp-5eaee4202e77086422317f3c24f719a52491ecc7.zip |
Avoid race condition of early handshake messages, when socket is active mode is not false.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssl/src/ssl.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index fd9ed4a344..0a9e216ca5 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -153,10 +153,10 @@ transport_accept(#sslsocket{pid = {ListenSocket, #config{cb=CbInfo, ssl=SslOpts} %% and options should be inherited. EmOptions = emulated_options(), {ok, InetValues} = inet:getopts(ListenSocket, EmOptions), - {CbModule,_,_} = CbInfo, + inet:setopts(ListenSocket, internal_inet_values()), + {CbModule,_,_} = CbInfo, case CbModule:accept(ListenSocket, Timeout) of {ok, Socket} -> - inet:setopts(Socket, internal_inet_values()), {ok, Port} = inet:port(Socket), ConnArgs = [server, "localhost", Port, Socket, {SslOpts, socket_options(InetValues)}, self(), CbInfo], |