Maybe you could do something like this: CancellableContext context = Context.current().withCancellation(); context.run(() -> stub.doStream(StreamRequest.getDefaultInstance(), new TestStreamObserver())); ... context.cancel(io.grpc.Status.ABORTED.asException());
-- Informatikgesellschaft für Software-Entwicklung mbH Schönebergstraße 15 52068 Aachen Telefon : +49 (0) 241 96888-0 Fax : +49 (0) 241 96888-69 Internet: www.ise-online.com <http://www.einsatzleitrechner.de/>Amtsgericht Aachen HR B 6044, Ust-ID: DE169963889 Geschäftsführer: Dipl. Inform. Thomas Dücker, Dipl. Inform. Frank Düren, Dipl. Inform. Peter Velroyen Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/94cea1d9-75dc-4f85-84e9-02a603a6fb1c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
