diff options
author | Hans Nilsson <[email protected]> | 2019-04-12 12:02:50 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2019-04-12 12:02:50 +0200 |
commit | 5db9ad449acfb72557409df0dee2a1b96031a584 (patch) | |
tree | f3d2683805d3fa0c847e48112aae945d905b8958 /lib/ssh/src/ssh.erl | |
parent | 1b8191a65a0b9dcccebc4f9ea7dd3fdb65279c61 (diff) | |
parent | c24ea58313c7a2b837831c9c8f9439d0ababe5df (diff) | |
download | otp-5db9ad449acfb72557409df0dee2a1b96031a584.tar.gz otp-5db9ad449acfb72557409df0dee2a1b96031a584.tar.bz2 otp-5db9ad449acfb72557409df0dee2a1b96031a584.zip |
Merge branch 'maint'
* maint:
ssh: Present peername for accept_callback fun also for Sockets
ssh: Add ssh_channel:init/1
Diffstat (limited to 'lib/ssh/src/ssh.erl')
-rw-r--r-- | lib/ssh/src/ssh.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl index 9281bf84a7..ff5aee14d7 100644 --- a/lib/ssh/src/ssh.erl +++ b/lib/ssh/src/ssh.erl @@ -127,7 +127,7 @@ connect(Socket, UserOptions, NegotiationTimeout) when is_port(Socket), Options -> case valid_socket_to_use(Socket, ?GET_OPT(transport,Options)) of ok -> - {ok, {Host,_Port}} = inet:sockname(Socket), + {ok, {Host,_Port}} = inet:peername(Socket), Opts = ?PUT_INTERNAL_OPT([{user_pid,self()}, {host,Host}], Options), ssh_connection_handler:start_connection(client, Socket, Opts, NegotiationTimeout); {error,SockError} -> |