From c7cdcb85f8116dda47c2960df1c8a3f3caf56d64 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Tue, 8 May 2012 15:36:21 +0200 Subject: ssl: Move and avoid ets:select bottleneck in client Do not use ssl_manager process for selecting an id. It's unnecessary to involve the manager process at all on the client side. --- lib/ssl/src/ssl_connection.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ssl/src/ssl_connection.erl') diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index df0af45a3b..431e6a3eaf 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -348,7 +348,7 @@ hello(start, #state{host = Host, port = Port, role = client, connection_states = ConnectionStates, renegotiation = {Renegotiation, _}} = State0) -> Hello = ssl_handshake:client_hello(Host, Port, ConnectionStates, SslOpts, - Renegotiation, Cert), + Cache, CacheCb, Renegotiation, Cert), Version = Hello#client_hello.client_version, Hashes0 = ssl_handshake:init_hashes(), @@ -393,7 +393,7 @@ hello(#server_hello{cipher_suite = CipherSuite, case ssl_session:is_new(OldId, NewId) of true -> - handle_new_session(NewId, CipherSuite, Compression, State); + handle_new_session(NewId, CipherSuite, Compression, State#state{connection_states = ConnectionStates}); false -> handle_resumed_session(NewId, State#state{connection_states = ConnectionStates}) end; @@ -699,7 +699,7 @@ connection(#hello_request{}, #state{host = Host, port = Port, renegotiation = {Renegotiation, _}, tls_handshake_hashes = Hashes0} = State0) -> Hello = ssl_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts, - Renegotiation, Cert), + Cache, CacheCb, Renegotiation, Cert), {BinMsg, ConnectionStates1, Hashes1} = encode_handshake(Hello, Version, ConnectionStates0, Hashes0), -- cgit v1.2.3