Skip to content

Commit

Permalink
Modify timeout value from 5000 to 30000
Browse files Browse the repository at this point in the history
  • Loading branch information
yosukehara committed Nov 14, 2013
1 parent 5d27d4d commit 4a5ad0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cowboy_req.erl
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ stream_body_recv(MaxLength, Req=#http_req{
transport=Transport, socket=Socket, buffer=Buffer,
body_state={stream, Length, _, _, _}}) ->
%% @todo Allow configuring the timeout.
case Transport:recv(Socket, min(Length, MaxLength), 5000) of
case Transport:recv(Socket, min(Length, MaxLength), 30000) of
{ok, Data} -> transfer_decode(<< Buffer/binary, Data/binary >>,
Req#http_req{buffer= <<>>});
{error, Reason} -> {error, Reason}
Expand Down Expand Up @@ -808,7 +808,7 @@ multipart_data(Req, 0, eof) ->
multipart_data(Req=#http_req{socket=Socket, transport=Transport},
Length, eof) ->
%% We just want to skip so no need to stream data here.
{ok, _Data} = Transport:recv(Socket, Length, 5000),
{ok, _Data} = Transport:recv(Socket, Length, 30000),
{eof, Req#http_req{body_state=done, multipart=undefined}};
multipart_data(Req, Length, {more, Parser}) when Length > 0 ->
case stream_body(Req) of
Expand Down

0 comments on commit 4a5ad0e

Please sign in to comment.