Commit 553b33a
committed
Address review comments.
- Use GrpcUtil.closeQuietly to close the buffered message in halfClosed() to prevent
unnecessary exception propagation if close fails after successful message delivery.
- Use stream.cancel instead of call.close when detecting too many requests for unary
calls. This ensures the transport is notified to abort the stream (sending RST_STREAM)
and immediately releases resources, preventing leaks from clients that withhold END_STREAM.1 parent 09d8c90 commit 553b33a
2 files changed
Lines changed: 7 additions & 15 deletions
File tree
- core/src
- main/java/io/grpc/internal
- test/java/io/grpc/internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
357 | | - | |
| 355 | + | |
358 | 356 | | |
359 | 357 | | |
360 | 358 | | |
| |||
401 | 399 | | |
402 | 400 | | |
403 | 401 | | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 402 | + | |
409 | 403 | | |
410 | 404 | | |
411 | 405 | | |
| |||
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
| 631 | + | |
| 632 | + | |
636 | 633 | | |
637 | | - | |
| 634 | + | |
638 | 635 | | |
| 636 | + | |
639 | 637 | | |
640 | 638 | | |
641 | 639 | | |
| |||
0 commit comments