Commit 170f4ca
authored
Don't fail closeFuture when an error occurs on closing (#487)
Strictly speaking, a `close` operation can't really fail (except when
the closing mode isn't supported or the channel is already closed). Even
if an error is encountered while closing a channel, or if an error
caused the channel to be closed, the end result is the same: the channel
will be closed.
In this case in particular, when streams are closed from the client
(i.e. by sending a RST_STREAM frame) the `HTTP2StreamChannel` would fail
the channel's `closeFuture`. This isn't appropriate however, as the
channel is successfully closed.
This change stops failing the stream channel's `closeFuture`. Instead,
if the close happens uncleanly, the error will be fired down the
pipeline and the `close` method's promise will be failed.1 parent 2083f5d commit 170f4ca
File tree
14 files changed
+268
-169
lines changed- IntegrationTests/tests_01_allocation_counters/Thresholds
- Sources/NIOHTTP2
- Tests/NIOHTTP2Tests
14 files changed
+268
-169
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
679 | | - | |
| 679 | + | |
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
704 | | - | |
| 704 | + | |
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| |||
Lines changed: 30 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| 88 | + | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| 93 | + | |
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
| |||
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
136 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
| |||
144 | 153 | | |
145 | 154 | | |
146 | 155 | | |
| 156 | + | |
| 157 | + | |
147 | 158 | | |
148 | 159 | | |
149 | 160 | | |
| 161 | + | |
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
| |||
466 | 478 | | |
467 | 479 | | |
468 | 480 | | |
469 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
470 | 485 | | |
471 | 486 | | |
472 | 487 | | |
| |||
476 | 491 | | |
477 | 492 | | |
478 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
479 | 497 | | |
480 | 498 | | |
481 | 499 | | |
| 500 | + | |
482 | 501 | | |
483 | 502 | | |
484 | 503 | | |
| |||
556 | 575 | | |
557 | 576 | | |
558 | 577 | | |
559 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
560 | 582 | | |
561 | 583 | | |
562 | 584 | | |
| |||
566 | 588 | | |
567 | 589 | | |
568 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
569 | 594 | | |
570 | 595 | | |
571 | 596 | | |
| 597 | + | |
572 | 598 | | |
573 | 599 | | |
574 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
116 | 122 | | |
117 | 123 | | |
118 | 124 | | |
119 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
| |||
128 | 137 | | |
129 | 138 | | |
130 | 139 | | |
| 140 | + | |
| 141 | + | |
131 | 142 | | |
132 | 143 | | |
133 | 144 | | |
| 145 | + | |
134 | 146 | | |
135 | 147 | | |
136 | 148 | | |
| |||
403 | 415 | | |
404 | 416 | | |
405 | 417 | | |
406 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
407 | 422 | | |
408 | 423 | | |
409 | 424 | | |
| |||
414 | 429 | | |
415 | 430 | | |
416 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
417 | 435 | | |
418 | 436 | | |
419 | 437 | | |
| 438 | + | |
420 | 439 | | |
421 | 440 | | |
422 | 441 | | |
| |||
492 | 511 | | |
493 | 512 | | |
494 | 513 | | |
495 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
496 | 518 | | |
497 | 519 | | |
498 | 520 | | |
| |||
503 | 525 | | |
504 | 526 | | |
505 | 527 | | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
506 | 531 | | |
507 | 532 | | |
508 | 533 | | |
| 534 | + | |
509 | 535 | | |
510 | 536 | | |
511 | 537 | | |
| |||
0 commit comments