mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Fixed handling QUIC stream eof.
Set r->pending_eof flag for a new QUIC stream with the fin bit. Also, keep r->ready set when r->pending_eof is set and buffer is empty.
This commit is contained in:
parent
89a6a4f198
commit
84a7835015
@ -1157,7 +1157,12 @@ ngx_quic_handle_stream_frame(ngx_connection_t *c,
|
|||||||
b = sn->b;
|
b = sn->b;
|
||||||
b->last = ngx_cpymem(b->last, f->data, f->length);
|
b->last = ngx_cpymem(b->last, f->data, f->length);
|
||||||
|
|
||||||
sn->c->read->ready = 1;
|
rev = sn->c->read;
|
||||||
|
rev->ready = 1;
|
||||||
|
|
||||||
|
if (f->fin) {
|
||||||
|
rev->pending_eof = 1;
|
||||||
|
}
|
||||||
|
|
||||||
qc->streams.handler(sn->c);
|
qc->streams.handler(sn->c);
|
||||||
|
|
||||||
@ -1595,7 +1600,7 @@ ngx_quic_stream_recv(ngx_connection_t *c, u_char *buf, size_t size)
|
|||||||
if (b->pos == b->last) {
|
if (b->pos == b->last) {
|
||||||
b->pos = b->start;
|
b->pos = b->start;
|
||||||
b->last = b->start;
|
b->last = b->start;
|
||||||
rev->ready = 0;
|
rev->ready = rev->pending_eof;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user