Permalink
Browse files

Merge pull request #80 from sg2342/fix_ssl_acceptor_drain

fix ssl acceptor drain
  • Loading branch information...
2 parents 49cd96e + baadac8 commit fa4f3732f356ec8c0d519c0803dc7e3ddbdd282a @knutin committed Apr 16, 2014
Showing with 4 additions and 0 deletions.
  1. +2 −0 src/elli_http.erl
  2. +2 −0 src/elli_tcp.erl
View
@@ -39,6 +39,8 @@ accept(Server, ListenSocket, Options, Callback) ->
?MODULE:accept(Server, ListenSocket, Options, Callback);
{error, econnaborted} ->
?MODULE:accept(Server, ListenSocket, Options, Callback);
+ {error, {tls_alert, _}} ->
+ ?MODULE:accept(Server, ListenSocket, Options, Callback);
{error, closed} ->
ok;
{error, Other} ->
View
@@ -38,6 +38,8 @@ accept({ssl, Socket}, Timeout) ->
case ssl:ssl_accept(S, Timeout) of
ok ->
{ok, {ssl, S}};
+ {error, closed} ->
+ {error, econnaborted};
{error, Reason} ->
{error, Reason}
end;

0 comments on commit fa4f373

Please sign in to comment.