Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the acceptor crash optional. #107

Merged
merged 1 commit into from
Apr 13, 2013
Merged

Conversation

djnym
Copy link
Contributor

@djnym djnym commented Apr 13, 2013

So turns out the "Fix for mochiweb_acceptor crash under R15B02" from
#91 was a bug in OTP fixed in R16B.

erlang/otp@6aa9e71

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.

So turns out the "Fix for mochiweb_acceptor crash under R15B02" from
mochi#91 was a bug in OTP fixed in R16B.

erlang/otp@6aa9e71

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.
etrepum added a commit that referenced this pull request Apr 13, 2013
Make the acceptor crash optional.
@etrepum etrepum merged commit 56a32a0 into mochi:master Apr 13, 2013
@djnym djnym deleted the gen_tcp_fix branch April 14, 2013 03:28
@djnym
Copy link
Contributor Author

djnym commented Apr 15, 2013

Thanks for the merge, any idea when you might tag a new version with this change?

@etrepum
Copy link
Member

etrepum commented Apr 15, 2013

I'll try and do something about that soon

@etrepum
Copy link
Member

etrepum commented Apr 15, 2013

I refactored the change a bit and made the script an actual test to verify that it works. Once travis says that it passes on all the supported VMs then I'll go ahead and tag as v2.6.0

92b8f5b
https://travis-ci.org/mochi/mochiweb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants