Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #91 from djnym/R15B02_mochiweb_acceptor_crash

Fix for mochiweb_acceptor crash under R15B02
  • Loading branch information...
commit dcd1076f24b56bf22f10312fd667b2e84bdafbe8 2 parents 5ee1eeb + fedfd11
@etrepum etrepum authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/mochiweb_http.erl
View
8 src/mochiweb_http.erl
@@ -66,6 +66,10 @@ request(Socket, Body) ->
{ssl_closed, _} ->
mochiweb_socket:close(Socket),
exit(normal);
+ {tcp_error,_,emsgsize} ->
+ % R15B02 returns this then closes the socket, so close and exit
+ mochiweb_socket:close(Socket),
+ exit(normal);
_Other ->
handle_invalid_request(Socket)
after ?REQUEST_RECV_TIMEOUT ->
@@ -95,6 +99,10 @@ headers(Socket, Request, Headers, Body, HeaderCount) ->
{tcp_closed, _} ->
mochiweb_socket:close(Socket),
exit(normal);
+ {tcp_error,_,emsgsize} ->
+ % R15B02 returns this then closes the socket, so close and exit
+ mochiweb_socket:close(Socket),
+ exit(normal);
_Other ->
handle_invalid_request(Socket, Request, Headers)
after ?HEADERS_RECV_TIMEOUT ->
Please sign in to comment.
Something went wrong with that request. Please try again.