Skip to content

Commit a2adf04

Browse files
committed
Fix retries that timeout hanging forever. (grpc#10855)
Fixes grpc#10336
1 parent 48d0e10 commit a2adf04

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/java/io/grpc/internal/RetriableStream.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ public void run() {
195195
}
196196
}
197197
if (retryFuture != null) {
198-
retryFuture.cancel(false);
198+
boolean cancelled = retryFuture.cancel(false);
199+
if (cancelled) {
200+
inFlightSubStreams.decrementAndGet();
201+
}
199202
}
200203
if (hedgingFuture != null) {
201204
hedgingFuture.cancel(false);

0 commit comments

Comments
 (0)