Commit adf01bf
authored
xds: fix race condition in ext_proc client interceptor halfClose (#12948)
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 296c007 commit adf01bf
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 | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
863 | 868 | | |
864 | 869 | | |
865 | 870 | | |
| |||
0 commit comments