[erlang-questions] Cowboy vs Misultin
Tue May 31 11:30:24 CEST 2011
Did you try my proposed changes?
On 05/31/2011 08:18 AM, Andy W. Song wrote:
> Cowboy can't pass my test this time. Connections start dropping from
> 20K, don't know why.
Works fine here.
I've noted a few more things however:
* Your hibernate call is in the wrong place, it should be right before
the receive, as there could be more than one frame queued and you'll
ignore it by hibernating right after the reply to the first frame.
* You should use erlang:hibernate, not proc_lib:hibernate, as this
process isn't started using proc_lib.
* If you don't need the HTTP headers or any HTTP stuff from the request
after socket initialization, you should just remove it from the record.
Include "cowboy/http.hrl" and change the #http_req contents to remove
the extra cruft. You'll use less than half you currently use doing this.
More information about the erlang-questions