[feature request] Add ability to set connect timeout to client
joshua-sp opened this issue · 2 comments
joshua-sp commented
Currently we can set the timeout on each request, but it seems that the actual initial connection itself has no timeout, which can lead to hanging if an endpoint is down.
Adding this would probably be a matter of adding a new field to ConnectOptions
to expose tonic::transport
's connect_timeout method
davidli2010 commented
@joshua-sp The PR #47 add a new API ConnectOptions::with_connect_timeout()
which can be used to set connect_timeout
, please review if it meets your requirement.
joshua-sp commented
Looks good to me, thanks a lot David!