diff options
author | Loïc Hoguin <[email protected]> | 2013-11-14 15:19:40 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-11-14 15:19:40 +0100 |
commit | 4876f33eb0d6218d8e1983f74eca7ade06cd6c86 (patch) | |
tree | 1a70d17ffaae038886ddee99843ec8f0023ef231 /src/ranch_ssl.erl | |
parent | b6662a357a02f8cd99d35eecd4288b847707f777 (diff) | |
download | ranch-4876f33eb0d6218d8e1983f74eca7ade06cd6c86.tar.gz ranch-4876f33eb0d6218d8e1983f74eca7ade06cd6c86.tar.bz2 ranch-4876f33eb0d6218d8e1983f74eca7ade06cd6c86.zip |
Fix a socket leak with SSL when ssl_accept fails
Diffstat (limited to 'src/ranch_ssl.erl')
-rw-r--r-- | src/ranch_ssl.erl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ranch_ssl.erl b/src/ranch_ssl.erl index 59e842c..53bcf8a 100644 --- a/src/ranch_ssl.erl +++ b/src/ranch_ssl.erl @@ -275,6 +275,7 @@ ssl_accept(Socket, Timeout) -> ok -> {ok, Socket}; {error, Reason} -> + ok = close(Socket), {error, {ssl_accept, Reason}} end. |