mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
fix badarith on commands
This commit is contained in:
parent
752297b153
commit
19faf0ae7f
1 changed files with 3 additions and 0 deletions
|
@ -970,6 +970,9 @@ commands(State=#state{out_streamid=Current, streams=Streams0}, StreamID, Command
|
||||||
Streams = lists:keyreplace(StreamID, #stream.id, Streams0,
|
Streams = lists:keyreplace(StreamID, #stream.id, Streams0,
|
||||||
Stream#stream{queue=Queue ++ Commands}),
|
Stream#stream{queue=Queue ++ Commands}),
|
||||||
State#state{streams=Streams};
|
State#state{streams=Streams};
|
||||||
|
%% When we have finished reading the request body, do nothing.
|
||||||
|
commands(State=#state{flow=infinity}, StreamID, [{flow, _}|Tail]) ->
|
||||||
|
commands(State, StreamID, Tail);
|
||||||
%% Read the request body.
|
%% Read the request body.
|
||||||
commands(State0=#state{flow=Flow0}, StreamID, [{flow, Size}|Tail]) ->
|
commands(State0=#state{flow=Flow0}, StreamID, [{flow, Size}|Tail]) ->
|
||||||
%% We must read *at least* Size of data otherwise functions
|
%% We must read *at least* Size of data otherwise functions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue