-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dispose the gRPC call underlying a Read if the read is only partially…
… consumed e.g. when early returning from an await foreach or calling .First(). The IAsyncEnumerable is disposed as before, but now that causes the cancellation of the ResponseStream read, so PumpMessages completes and the call is disposed. The CancellationTokenSource need not be disposed because it is always cancelled (That is, as long as the user makes any attempt to consume the read - if they don't then the call remains open as before)
- Loading branch information
1 parent
8b40e89
commit 0acc029
Showing
1 changed file
with
62 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters