Commit 61390a4
committed
xds: fix race condition in ext_proc client interceptor halfClose
Fixes a race condition in ExternalProcessorClientInterceptor$DataPlaneClientCall.halfClose()
that can cause the call to hang when the external processor stream completes concurrently.
If the external processor stream completes (marking state as COMPLETED and setting
passThroughMode to true) after halfClose() has already checked passThroughMode (seeing false),
halfClose() would subsequently see the state as COMPLETED and return early without
invoking proceedWithHalfClose().
This commit fixes the race by re-checking passThroughMode inside the isCompleted() block in
halfClose(), ensuring we proceed with half-close if pass-through mode was enabled late.1 parent 21d6c71 commit 61390a4
1 file changed
Lines changed: 5 additions & 0 deletions
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
854 | 859 | | |
855 | 860 | | |
856 | 861 | | |
| |||
0 commit comments