0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Don't receive data from the socket only once in the loop handler

This commit is contained in:
Loïc Hoguin 2013-04-12 14:34:36 +02:00
parent 2aabc73045
commit 61ca459feb

View file

@ -200,7 +200,7 @@ handler_loop(Req, State=#state{loop_buffer_size=NbBytes,
Req2 = cowboy_req:append_buffer(Data, Req),
State2 = handler_loop_timeout(State#state{
loop_buffer_size=NbBytes2}),
handler_loop(Req2, State2, Handler, HandlerState)
handler_before_loop(Req2, State2, Handler, HandlerState)
end;
{Closed, Socket} ->
terminate_request(Req, State, Handler, HandlerState,