aboutsummaryrefslogtreecommitdiffstats
path: root/src/cow_http2_machine.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cow_http2_machine.erl')
-rw-r--r--src/cow_http2_machine.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cow_http2_machine.erl b/src/cow_http2_machine.erl
index 30654d0..8f7f5ea 100644
--- a/src/cow_http2_machine.erl
+++ b/src/cow_http2_machine.erl
@@ -1184,9 +1184,9 @@ send_or_queue_data(StreamID, State0=#http2_machine{opts=Opts, local_window=ConnW
_ ->
DataOrFileOrTrailers0
end,
- SendSize = BufferSize + case DataOrFileOrTrailers of
- {data, D} -> iolist_size(D);
- #sendfile{bytes=B} -> B;
+ SendSize = case DataOrFileOrTrailers of
+ {data, D} -> BufferSize + iolist_size(D);
+ #sendfile{bytes=B} -> BufferSize + B;
{trailers, _} -> 0
end,
MinSendSize = maps:get(stream_window_data_threshold, Opts, 16384),