On Fri, 6 Oct 2017 at 7:29 pm, Nan Xiao <[email protected]> wrote:
> Hi Amit, > > Thanks for your response! > > But I think set_deadline doesn't help. For example, if set_deadline(10 > seconds), assume my client sends a very large packet whose time > exceeds 10 seconds, the client still disconnects the server although > the transmission is still on-going. Sorry I may have misunderstood your original query. Is your concern that the server is not functioning correctly, a channel is created but a client request still blocks? If so, You could implement a wrapper (client interceptor) which will disconnect the client if a request takes longer than your desired timeout seconds? Is your c > > Best Regards > Nan Xiao > > > On Fri, Oct 6, 2017 at 4:06 PM, Amit Saha <[email protected]> wrote: > > You could set a timeout while creating the channel. > > https://github.com/grpc/grpc/issues/3954 may help you. > > > > > > > > On Fri, Oct 6, 2017 at 6:23 PM <[email protected]> wrote: > >> > >> Hi all, > >> > >> Greetings from me! I find in greeter_client.cc code: > >> > >> GreeterClient greeter(grpc::CreateChannel( > >> "localhost:50051", grpc::InsecureChannelCredentials())); > >> > >> If I use a fake host name, such as "badhost": > >> > >> GreeterClient greeter(grpc::CreateChannel( > >> "badhost:50051", grpc::InsecureChannelCredentials())); > >> > >> I find the greet_client will block forever at my ArchLinux server. > >> > >> Is there any method to avoid this case? Thanks very much in advance! > >> > >> Best Regards > >> Nan Xiao > >> > >> -- > >> 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/f7ea3e0c-aae8-4c57-bf89-58e3cf6ea3ee%40googlegroups.com > . > >> For more options, visit https://groups.google.com/d/optout. > -- 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/CANODV3nRjQBVDkVCe2JJ5b1TtOWDabW%2BOxOb%2B6UEzcvQxAOFgA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
