diff options
| author | itrofimow <[email protected]> | 2024-01-23 16:39:33 +0300 |
|---|---|---|
| committer | itrofimow <[email protected]> | 2024-01-23 17:06:52 +0300 |
| commit | 551cba187dcaa100eca4fd168404819417232fac (patch) | |
| tree | 2a2f6f12240c195a99006de69dafe5b7688d52dd | |
| parent | 8ebb5e504f638cbfc9bc614113db611c62630bdb (diff) | |
bug contrib/grpc: fix races between retries and cancellation
| -rw-r--r-- | contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc index 7ec4d5389cf..c98ce6ee0b2 100644 --- a/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc +++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc @@ -2604,7 +2604,9 @@ void RetryFilter::CallData::OnRetryTimerLocked(void* arg, grpc_error_handle /*error*/) { auto* calld = static_cast<CallData*>(arg); calld->retry_timer_handle_.reset(); - calld->CreateCallAttempt(/*is_transparent_retry=*/false); + if (calld->cancelled_from_surface_.ok()) { + calld->CreateCallAttempt(/*is_transparent_retry=*/false); + } GRPC_CALL_STACK_UNREF(calld->owning_call_, "OnRetryTimer"); } |
