aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2014-05-09 11:15:10 +0200
committerHans Nilsson <[email protected]>2014-05-09 11:15:10 +0200
commit38359508acec5f0bfe51add66d3bd4cbbcf5520f (patch)
tree16fdf02eb2bfdc7599e8089053e18747b33f9bc4 /lib/ssh/src/ssh.erl
parentc5979e269c01789546f03660930e3991ee1037b8 (diff)
parentc4c40e2554a8b90adeea1ac38f36a0e9a51fac9d (diff)
downloadotp-38359508acec5f0bfe51add66d3bd4cbbcf5520f.tar.gz
otp-38359508acec5f0bfe51add66d3bd4cbbcf5520f.tar.bz2
otp-38359508acec5f0bfe51add66d3bd4cbbcf5520f.zip
Merge branch 'hans/ssh/connect_timeouts/OTP-11908' into maint
Diffstat (limited to 'lib/ssh/src/ssh.erl')
-rw-r--r--lib/ssh/src/ssh.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 75081b7a61..240de69eff 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -1,7 +1,7 @@
%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -73,8 +73,9 @@ connect(Host, Port, Options, Timeout) ->
{SocketOptions, SshOptions} ->
{_, Transport, _} = TransportOpts =
proplists:get_value(transport, Options, {tcp, gen_tcp, tcp_closed}),
+ ConnectionTimeout = proplists:get_value(connect_timeout, Options, infinity),
Inet = proplists:get_value(inet, SshOptions, inet),
- try Transport:connect(Host, Port, [ {active, false}, Inet | SocketOptions], Timeout) of
+ try Transport:connect(Host, Port, [ {active, false}, Inet | SocketOptions], ConnectionTimeout) of
{ok, Socket} ->
Opts = [{user_pid, self()}, {host, Host} | fix_idle_time(SshOptions)],
ssh_connection_handler:start_connection(client, Socket, Opts, Timeout);