Repository navigation
Commit 7288a16
committed
http2: send deferred RST_STREAM on stream destroy
close() with NO_ERROR waits for 'finish' before sending RST_STREAM.
If the body is stuck behind flow control and the stream is destroyed
first, RST_STREAM is never sent and nghttp2 keeps the stream open.
On the next WINDOW_UPDATE, OnRead finds no stream and returns 0
without EOF, so nghttp2 sends empty DATA frames until OOM. Both
client and server streams are affected.
Send the deferred RST_STREAM in _destroy(). As a backstop, return
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE from OnRead when the stream is
gone, which nghttp2 documents as the way to reset a stream on error.
Fixes: #67363
Signed-off-by: inoway46 <inoueyuya416@gmail.com>1 parent 2929073 commit 7288a16
4 files changed
Lines changed: 117 additions & 2 deletions
File tree
- lib/internal/http2
- src
- test/parallel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| 351 | + | |
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| |||
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
| 648 | + | |
| 649 | + | |
647 | 650 | | |
648 | 651 | | |
649 | 652 | | |
| |||
2166 | 2169 | | |
2167 | 2170 | | |
2168 | 2171 | | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
2169 | 2175 | | |
2170 | 2176 | | |
2171 | 2177 | | |
| |||
2188 | 2194 | | |
2189 | 2195 | | |
2190 | 2196 | | |
| 2197 | + | |
2191 | 2198 | | |
2192 | 2199 | | |
2193 | 2200 | | |
| |||
2681 | 2688 | | |
2682 | 2689 | | |
2683 | 2690 | | |
2684 | | - | |
| 2691 | + | |
2685 | 2692 | | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
2686 | 2701 | | |
2687 | 2702 | | |
2688 | 2703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2840 | 2840 | | |
2841 | 2841 | | |
2842 | 2842 | | |
2843 | | - | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
2844 | 2847 | | |
2845 | 2848 | | |
2846 | 2849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments