aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-02-15 15:12:37 +0100
committerHans Nilsson <[email protected]>2017-02-15 15:12:37 +0100
commitd21031900160a70408f0ee6f1b2f8bd01f1cbde7 (patch)
tree993be1d6263dcad3608de6930a0cc5825d659462 /lib
parentaa1a098b46d0a4d8dd122efcc78a7a1a3f6c6e4e (diff)
downloadotp-d21031900160a70408f0ee6f1b2f8bd01f1cbde7.tar.gz
otp-d21031900160a70408f0ee6f1b2f8bd01f1cbde7.tar.bz2
otp-d21031900160a70408f0ee6f1b2f8bd01f1cbde7.zip
ssh: Add error case for bad socket
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/src/ssh.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 31e343e81b..8d8e20730d 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -317,6 +317,7 @@ start_daemon(Socket, Options) ->
do_start_daemon(Socket, [{role,server}|SshOptions], SocketOptions)
catch
throw:bad_fd -> {error,bad_fd};
+ throw:bad_socket -> {error,bad_socket};
_C:_E -> {error,{cannot_start_daemon,_C,_E}}
end;
{error,SockError} ->
@@ -333,6 +334,7 @@ start_daemon(Host, Port, Options, Inet) ->
do_start_daemon(Host, Port, [{role,server}|SshOptions] , [Inet|SocketOptions])
catch
throw:bad_fd -> {error,bad_fd};
+ throw:bad_socket -> {error,bad_socket};
_C:_E -> {error,{cannot_start_daemon,_C,_E}}
end
end.