I think it's because calling `withDeadlineAfter` applies the timestamp of the deadline to a new stub and returns that new stub to you. If the deadline value is small, the deadline may expire before you have a chance to finish your second RPC. This is true for all stubs. Creating new stubs are cheap, so you can create a new stub with a deadline when you are making each RPC.
On Monday, March 19, 2018 at 2:50:43 AM UTC-7, Baojun Xu wrote: > > Hi, > > I am trying to use withDeadlineAfter() on a futureStub, but noticed that > an error DEADLINE_EXCEEDED" is always thrown when a rpc is made on the > futureStub for a second time. > > Just wondering why this is the case? Maybe there is some restrictions to > use deadlines with FutureStubs? > > Any help is appreciated! > > Best, > Baojun > -- 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/ecc7a2d0-a3a5-4e6a-8e7e-4b9e910143eb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
