Best practice to close QUIC stream and delete app object after peer-initiated RESET_STREAM (ngtcp2 + nghttp3)
#409
Answered
by
tatsuhiro-t
yasha-liebes
asked this question in
Q&A
|
Context
Questions
What I want to confirm
|
Answered by
tatsuhiro-t
Nov 5, 2025
Replies: 1 comment 1 reply
|
RESET_STREAM from a remote endpoint means that it stops sending stream data on that stream, and cancels all unacknowledged data. This is equivalent for the receiver (in this case, client) to call ngtcp2_conn_shutdown_stream_read(), so in this case, you do not need to call ngtcp2_conn_shutdown_stream_read yourself. If you have not send stream fin to server, you should call ngtcp2_conn_shutdown_stream_write, which will send RESET_STREAM to the remote endpoint. After the packet is acknowledged by the remote endpoint, the stream is closed, and stream_close callback will be invoked. |
1 reply
Answer selected by
yasha-liebes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RESET_STREAM from a remote endpoint means that it stops sending stream data on that stream, and cancels all unacknowledged data. This is equivalent for the receiver (in this case, client) to call ngtcp2_conn_shutdown_stream_read(), so in this case, you do not need to call ngtcp2_conn_shutdown_stream_read yourself.
If you have not send stream fin to server, you should call ngtcp2_conn_shutdown_stream_write, which will send RESET_STREAM to the remote endpoint. After the packet is acknowledged by the remote endpoint, the stream is closed, and stream_close callback will be invoked.