Commit 5b17a69
authored
fix(http2): cancel sending client request body on response future drop (#4042)
When the client drops the response future (e.g. due to a timeout),
send_task detects the cancellation but does not notify pipe_task.
The pipe_task continues to hold the h2 SendStream, preventing a
RST_STREAM from being sent and keeping flow-control window capacity
locked.
Add a oneshot channel between send_task and pipe_task. When send_task
detects cancellation via poll_canceled, it signals pipe_task through
the channel. pipe_task then calls send_reset(CANCEL) on the h2
SendStream, which sends RST_STREAM to the server and frees
flow-control capacity.
Closes #40401 parent 7211ec2 commit 5b17a69
4 files changed
Lines changed: 86 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
369 | 372 | | |
370 | 373 | | |
371 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
464 | 465 | | |
465 | 466 | | |
466 | 467 | | |
| |||
474 | 475 | | |
475 | 476 | | |
476 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
477 | 498 | | |
478 | 499 | | |
479 | 500 | | |
| |||
500 | 521 | | |
501 | 522 | | |
502 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
503 | 528 | | |
504 | 529 | | |
505 | 530 | | |
| |||
519 | 544 | | |
520 | 545 | | |
521 | 546 | | |
| 547 | + | |
522 | 548 | | |
523 | 549 | | |
524 | 550 | | |
| |||
539 | 565 | | |
540 | 566 | | |
541 | 567 | | |
| 568 | + | |
542 | 569 | | |
543 | 570 | | |
544 | 571 | | |
| |||
558 | 585 | | |
559 | 586 | | |
560 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
561 | 598 | | |
562 | 599 | | |
563 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2868 | 2868 | | |
2869 | 2869 | | |
2870 | 2870 | | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
2871 | 2912 | | |
2872 | 2913 | | |
2873 | 2914 | | |
| |||
0 commit comments