Sorry there was some observational error. Anyways; thanks all of you for 
your help.

-Rajeev

On Tuesday, 2 May 2017 11:15:37 UTC+5:30, [email protected] wrote:
>
>
> Hello,
>
> Is there a way to close down BiDi streaming gracefully from C++ server 
> thread (pthr) when c++ client gets aborted? When I simply return from Bidi 
> streaming rpc based on IsCancelled() I observe memory leaks.
>
> Here is the sample code
>
>
> Status BiDiServiceImpl::BiDiStreamingRpc(::grpc::ServerContext* context, 
>  ::grpc::ServerReaderWriter< BiDiResponse, BiDiRequest>* stream)
> {
>     BiDiRequest     req;
>     BiDiResponse   resp;
>                
>     stream->Read(&req);
>     while(context->IsCancelled() == false)
>     {
>         getResp(resp);
>         stream->Write(resp);
>     }
>     return(Status(Status::GRPC_OK, ""));
> }
>
>
> Thanks
> Rajeev
>
>

-- 
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/777e1987-0b94-432b-8956-6de50667c35b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to