mochi/mochiweb — Issue #68: Is timeout in gen_tcp:accept really needed?
Author: stangrze
Created: 2011-12-15 11:16:20+00:00
State: open

Hi.
In mochiweb_socket.erl in line 43 there is:
accept(ListenSocket) ->
gen_tcp:accept(ListenSocket, ?ACCEPT_TIMEOUT).

This makes gen_tcp processes to die after timeout.
They constantly get respawned and die every 2 secs.
This adds unnesesary load to VM.
It shoud be better to let them wait for connection 'forever'.