diff options
author | Hans Nilsson <[email protected]> | 2019-04-12 12:00:17 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2019-04-12 12:00:17 +0200 |
commit | cee66a3a287abc9b96ce019ea3e9cf2a38d283e0 (patch) | |
tree | 25014acf7708291f6b87094d11a4ee39e4291edc /lib/ssh | |
parent | d90b83daa112f1d271b054300640a5b563241590 (diff) | |
parent | 10f9c216a5736f0861185be619774cb7fea9c0ef (diff) | |
download | otp-cee66a3a287abc9b96ce019ea3e9cf2a38d283e0.tar.gz otp-cee66a3a287abc9b96ce019ea3e9cf2a38d283e0.tar.bz2 otp-cee66a3a287abc9b96ce019ea3e9cf2a38d283e0.zip |
Merge branch 'hans/ssh/accept_callback_socket/OTP-15763' into maint-21
* hans/ssh/accept_callback_socket/OTP-15763:
ssh: Present peername for accept_callback fun also for Sockets
Diffstat (limited to 'lib/ssh')
-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} -> |