In response stream observer onError() callback, you implement the cleanup 
logic for your application. The failed stream is cleaned up by itself, 
don't call any method of request observer then.

On Tuesday, July 23, 2019 at 6:53:18 AM UTC-7, Joseph Vaughan wrote:
>
> By onClose, I meant onCompleted.
>
> On Tuesday, 23 July 2019 14:51:24 UTC+1, Joseph Vaughan wrote:
>>
>> Hi all,
>>
>> I'm working on some edge cases in an Android application. I have a 
>> bidi-stream which I'd like to clean up cleanly when it fails to start the 
>> RPC. 
>>
>> I'm triggering the RPC using the async stub, storing the resulting 
>> request stream and the passed in response stream. After some time period, I 
>> receive a call to onError() on the response stream, detailing that it could 
>> not connect with the Status code Unavailable. 
>>
>> At this point I'd like to be able to call the async stub again and 
>> receive a new stream. What should I do to ensure the previously failed 
>> stream is cleaned up? Should I call onError, or onClose of the request 
>> stream?
>>
>> Appreciate any help,
>> Joe.
>>
>

-- 
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/1a0a75a7-a8cf-419f-9519-af985370f589%40googlegroups.com.

Reply via email to