diff options
author | Erlang/OTP <[email protected]> | 2019-04-16 16:37:39 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2019-04-16 16:37:39 +0200 |
commit | 2c2661a195d1a98da420c03b05ecf01e7bc498e3 (patch) | |
tree | 13dd221f75958d897f465af35b371df381bd6579 /lib | |
parent | ead6e83a4a3abb4f9e4a58ea6ed125c8b09326d0 (diff) | |
parent | 10f9c216a5736f0861185be619774cb7fea9c0ef (diff) | |
download | otp-2c2661a195d1a98da420c03b05ecf01e7bc498e3.tar.gz otp-2c2661a195d1a98da420c03b05ecf01e7bc498e3.tar.bz2 otp-2c2661a195d1a98da420c03b05ecf01e7bc498e3.zip |
Merge branch 'hans/ssh/accept_callback_socket/OTP-15763' into maint-20
* hans/ssh/accept_callback_socket/OTP-15763:
ssh: Present peername for accept_callback fun also for Sockets
Diffstat (limited to 'lib')
-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 5f5ccee4f8..a67a9a15e8 100644 --- a/lib/ssh/src/ssh.erl +++ b/lib/ssh/src/ssh.erl @@ -109,7 +109,7 @@ connect(Socket, UserOptions, Timeout) 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, Timeout); {error,SockError} -> |