mochi/mochiweb — pull request #107 by djnym (2013-04-13 22:26:44+00:00)
Title: Make the acceptor crash optional.

So turns out the "Fix for mochiweb_acceptor crash under R15B02" from
https://github.com/mochi/mochiweb/pull/91 was a bug in OTP fixed in R16B.

https://github.com/erlang/otp/commit/6aa9e71dbb279a172b5a2c86f28cbfada1b68080

So it worked in R14, was broken in R15 and got fixed in R16. This commit
makes it such that things will work as well as possible in each version.

In rebar.config I set a compiler option if on R14 or R16, in mochiweb_http.erl
I make the extra R15 clause be added with the macro, then in
mochiweb_socket_server.erl I add in { exit_on_close, false } to the options.

In addition there is a script which will detect if the fix is needed based
on my test case from issue 91.

Just run 'make ; cd scripts ; ./check_for_gen_tcp_fix.erl' and it should
return true if the fix is in place.