mirror of https://github.com/grpc/grpc.git
fix: Re-raise python asyncio.CancelledErrors (#31982)
This is motivated by #31227 which I also encountered recently. I'm not familiar with the call lifecycle details, but it seems clear that there is some kind of race condition between user-initiated cancellations and other completion status updates. If a user cancels a call before being notified of its completion, I believe it should be considered cancelled unconditionally, regardless of whether the call actually completed successfully before its cancellation status could be set. So it seems better to re-raise explicitly rather than using self._raise_for_status(), which is a no-op in this race condition and can lead to an UnboundedLocalError.pull/32014/head^2
parent
aa83319695
commit
353afc2dd9
1 changed files with 4 additions and 3 deletions
Loading…
Reference in new issue