Fix retries that timeout hanging forever. (#10855)

Fixes #10336
This commit is contained in:
Larry Safran 2024-01-31 13:15:35 -08:00 committed by GitHub
parent 8d280c97e3
commit c0a9d315d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -195,7 +195,10 @@ abstract class RetriableStream<ReqT> implements ClientStream {
}
}
if (retryFuture != null) {
retryFuture.cancel(false);
boolean cancelled = retryFuture.cancel(false);
if (cancelled) {
inFlightSubStreams.decrementAndGet();
}
}
if (hedgingFuture != null) {
hedgingFuture.cancel(false);