mirror of https://github.com/grpc/grpc.git
[ruby] Make `GRPC::DeadlineExceeded` report properly (#33565)
In grpc v1.46.2 and later versions, #29155 caused the Ruby client to return `GRPC::Core::CallError`, a non-standard error, with a message: `grpc_call_start_batch failed with outstanding read or write present (code=8)`. However, the actual error should have been `GRPC::DeadlineExceeded`. This occurred because when `GRPC::DeadlineExceeded` is raised, the `@metadata_received` flag doesn't get flipped. When `receive_and_check_status` runs to determine
the error, the `RECV_INITIAL_METADATA` is erroneously sent again.
To avoid this, flip the flag in an `ensure` block whenever the `RECV_INITIAL_METADATA` op is set.
Closes #33283
Closes #33565
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/33565 from stanhu:sh-ruby-fix-issue-33283 850889558c
PiperOrigin-RevId: 614088694
pull/36035/head
parent
b78f64569a
commit
489d24cf7e
2 changed files with 33 additions and 2 deletions
Loading…
Reference in new issue