Yes. If you want to abort the stream, just cancel it with TryCancel.
On Sunday, July 12, 2020 at 11:19:16 PM UTC-7 [email protected] wrote: > > Hi. > > Let's assume that I can written an asynchronous grpc client that send a > stream and gets a response. This situation uses `ClientAsyncWriter` class. > How we can stop sending message in middle of stream? For example, we detect > a problem with our stream of messages after sending few messages and need > to stop sending messages. What we can do? because there is no method to > stop sending data with error. The only way that came to my mind was to > cancel rpc connection by using `TryCancel` on the context. Is this a > correct way to handle this situation? or should I use another method? > > Best Regards > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/0e2af389-0b30-4f3c-9fd8-bdb029e629b4n%40googlegroups.com.
