Browse Source

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

Loïc Hoguin 12 years ago
parent
commit
61ca459feb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/cowboy_handler.erl

+ 1 - 1
src/cowboy_handler.erl

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