aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3_encode.h
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2022-02-09 15:51:42 +0300
committerVladimir Homutov <vl@nginx.com>2022-02-09 15:51:42 +0300
commit45a8ca0e7a1ae7ec4f7769919e9f3e007113d5ad (patch)
tree9f40c3746fbba416b345937b536ad87b8832e8f8 /src/http/v3/ngx_http_v3_encode.h
parent72d0668627ae2ee8a8d33d9d9e65ebc5c11e1e38 (diff)
downloadnginx-45a8ca0e7a1ae7ec4f7769919e9f3e007113d5ad.tar.gz
nginx-45a8ca0e7a1ae7ec4f7769919e9f3e007113d5ad.zip
QUIC: fixed in-flight bytes accounting.
Initially, frames are genereated and stored in ctx->frames. Next, ngx_quic_output() collects frames to be sent in in ctx->sending. On failure, ngx_quic_revert_sned() returns frames into ctx->frames. On success, the ngx_quic_commit_send() moves ack-eliciting frames into ctx->sent and frees non-ack-eliciting frames. This function also updates in-flight bytes counter, so only actually sent frames are accounted. The counter is decremented in the following cases: - acknowledgment is received - packet was declared lost - we are discarding context completely In each of this cases frame is removed from ctx->sent queue and in-flight counter is accordingly decremented. The patch fixes the case of discarding context - only removing frames from ctx->sent must be followed by in-flight bytes counter decrement, otherwise cg->in_flight could experience type underflow. The issue appeared in b1676cd64dc9.
Diffstat (limited to 'src/http/v3/ngx_http_v3_encode.h')
0 files changed, 0 insertions, 0 deletions