diff options
author | Hans Nilsson <[email protected]> | 2017-02-15 15:13:54 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-02-15 15:13:54 +0100 |
commit | cd88d70ffb0f325fa84c8548b3dca1f7865ee86d (patch) | |
tree | 3faf961a568ce32ed740c53c86bcfcba7f674dae /lib/ssh | |
parent | d21031900160a70408f0ee6f1b2f8bd01f1cbde7 (diff) | |
download | otp-cd88d70ffb0f325fa84c8548b3dca1f7865ee86d.tar.gz otp-cd88d70ffb0f325fa84c8548b3dca1f7865ee86d.tar.bz2 otp-cd88d70ffb0f325fa84c8548b3dca1f7865ee86d.zip |
ssh: More exact test for is_tcp_socket
Diffstat (limited to 'lib/ssh')
-rw-r--r-- | lib/ssh/src/ssh.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl index 8d8e20730d..657cf4c62d 100644 --- a/lib/ssh/src/ssh.erl +++ b/lib/ssh/src/ssh.erl @@ -280,9 +280,11 @@ valid_socket_to_use(Socket, Options) -> {error, {unsupported,L4}} end. -is_tcp_socket(Socket) -> {ok,[]} =/= inet:getopts(Socket, [delay_send]). - - +is_tcp_socket(Socket) -> + case inet:getopts(Socket, [delay_send]) of + {ok,[_]} -> true; + _ -> false + end. daemon_shell_opt(Options) -> case proplists:get_value(shell, Options) of |