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

Fix a number of low hanging todos

This commit is contained in:
Loïc Hoguin 2019-10-10 15:53:26 +02:00
parent ecb39eea10
commit a73004e966
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
4 changed files with 9 additions and 22 deletions

View file

@ -78,8 +78,8 @@
-record(ps_body, {
length :: non_neg_integer() | undefined,
received = 0 :: non_neg_integer(),
transfer_decode_fun :: fun(), %% @todo better type
transfer_decode_state :: any() %% @todo better type
transfer_decode_fun :: fun((binary(), cow_http_te:state()) -> cow_http_te:decode_ret()),
transfer_decode_state :: cow_http_te:state()
}).
-record(stream, {
@ -1275,8 +1275,6 @@ stream_terminate(State0=#state{opts=Opts, in_streamid=InStreamID, in_state=InSta
NextOutStreamID = OutStreamID + 1,
case lists:keyfind(NextOutStreamID, #stream.id, Streams) of
false ->
%% @todo This is clearly wrong, if the stream is gone we need to check if
%% there used to be such a stream, and if there was to send an error.
State#state{out_streamid=NextOutStreamID, out_state=wait};
#stream{queue=Commands} ->
%% @todo Remove queue from the stream.