aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2012-06-08 14:51:08 +0200
committerIngela Anderton Andin <[email protected]>2012-06-08 17:34:09 +0200
commit06260ce858582aa0319a4ad9768291bd51f63505 (patch)
tree1ac8d5af0496d82dea07eceedaf0f29ed9078a84 /lib/ssl
parent8e80b89c7aafc70fbcb538c9c6b464912cb11d83 (diff)
downloadotp-06260ce858582aa0319a4ad9768291bd51f63505.tar.gz
otp-06260ce858582aa0319a4ad9768291bd51f63505.tar.bz2
otp-06260ce858582aa0319a4ad9768291bd51f63505.zip
ssl: Avoid second bottleneck in supervisor
Do proc_lib:spawn_link instead of proc_lib:start_link as synchronized init is not used/needed anyway.
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/src/ssl_connection.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index ce20e72524..0f436a6caf 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -298,10 +298,9 @@ prf(ConnectionPid, Secret, Label, Seed, WantedLength) ->
%% does not return until Module:init/1 has returned.
%%--------------------------------------------------------------------
start_link(Role, Host, Port, Socket, Options, User, CbInfo) ->
- proc_lib:start_link(?MODULE, init, [[Role, Host, Port, Socket, Options, User, CbInfo]]).
+ {ok, proc_lib:spawn_link(?MODULE, init, [[Role, Host, Port, Socket, Options, User, CbInfo]])}.
init([Role, Host, Port, Socket, {SSLOpts0, _} = Options, User, CbInfo]) ->
- proc_lib:init_ack({ok, self()}),
State0 = initial_state(Role, Host, Port, Socket, Options, User, CbInfo),
Hashes0 = ssl_handshake:init_hashes(),
TimeStamp = calendar:datetime_to_gregorian_seconds({date(), time()}),