aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_test_lib.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-03-08 09:45:42 +0100
committerIngela Anderton Andin <[email protected]>2011-03-08 09:45:54 +0100
commit442fcfd70f0ddc9bd6ca029f5da1de6a0dee5b05 (patch)
treee00e0a87beb7823041c1d59ee55e9e63c143fb6a /lib/ssl/test/ssl_test_lib.erl
parent4c7786f58f8f101723b00e839baa068f8cf34579 (diff)
parentc034b8ce819cfe1171720499387815ae8dc84bc9 (diff)
downloadotp-442fcfd70f0ddc9bd6ca029f5da1de6a0dee5b05.tar.gz
otp-442fcfd70f0ddc9bd6ca029f5da1de6a0dee5b05.tar.bz2
otp-442fcfd70f0ddc9bd6ca029f5da1de6a0dee5b05.zip
Merge branch 'jk/ssl_connection_hibernate' into dev
* jk/ssl_connection_hibernate: Add the option { hibernate_after, int() } to ssl:connect and ssl:listen OTP-9106
Diffstat (limited to 'lib/ssl/test/ssl_test_lib.erl')
-rw-r--r--lib/ssl/test/ssl_test_lib.erl12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index f6ccbe85e3..8c639aa312 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -128,12 +128,14 @@ remove_close_msg(ReconnectTimes) ->
remove_close_msg(ReconnectTimes -1)
end.
-
start_client(Args) ->
- Result = spawn_link(?MODULE, run_client, [Args]),
+ Result = spawn_link(?MODULE, run_client, [lists:delete(return_socket, Args)]),
receive
- connected ->
- Result
+ { connected, Socket } ->
+ case lists:member(return_socket, Args) of
+ true -> { Result, Socket };
+ false -> Result
+ end
end.
run_client(Opts) ->
@@ -145,7 +147,7 @@ run_client(Opts) ->
test_server:format("ssl:connect(~p, ~p, ~p)~n", [Host, Port, Options]),
case rpc:call(Node, ssl, connect, [Host, Port, Options]) of
{ok, Socket} ->
- Pid ! connected,
+ Pid ! { connected, Socket },
test_server:format("Client: connected~n", []),
%% In specail cases we want to know the client port, it will
%% be indicated by sending {port, 0} in options list!