Hi Vivas,

Did you ever figure out what the problem was?

Aleks

On Saturday, October 10, 2020 at 4:23:36 PM UTC-4 [email protected] 
wrote:

> I am using the code from this async example: 
> https://github.com/grpc/grpc/blob/v1.32.0/examples/cpp/helloworld/greeter_async_server.cc
>
> I've made a research and it seems that you can directly catch when a 
> client has been disconnected by any reason. However you can tell that 
> client has been disconnected by turning the feature KeepAlive.
>
> So I added the following lines on the server:
>
> *builder.AddListeningPort(server_address, 
> grpc::InsecureServerCredentials()); 
> builder.AddChannelArgument(GRPC_ARG_KEEPALIVE_TIME_MS, 2000); 
> builder.AddChannelArgument(GRPC_ARG_KEEPALIVE_TIMEOUT_MS, 3000); 
> builder.AddChannelArgument(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS, 1);*
>
> However how can I now detect the disconnect? Just by adding those there is 
> no way to catch the disconnect. There is no example about such scenario. 
> Where should I listen? on `ServerContext` or where and how to exactly 
> detect it ?
>

-- 
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/42a27e0d-6a4f-4d02-8ce4-945154126b31n%40googlegroups.com.

Reply via email to