stepancheg / grpc-rust

Rust implementation of gRPC
MIT License
1.37k stars 124 forks source link

Add option for a timeout while requesting a new connection #59

Closed weiznich closed 7 years ago

weiznich commented 7 years ago

On windows the client goes in a infinite loop if it could not connect to the given server. This makes it possible to configure a timeout to prevent it.

siddontang commented 7 years ago

Is it better that using Timeout for all requests? Not only connect, but for read/write Timeout too.

stepancheg commented 7 years ago

@siddontang

Is it better that using Timeout for all requests? Not only connect, but for read/write Timeout too.

IMO, read/write timeouts are not very useful practically. What required is per-call request timeout, deadline (instant) for for whole operation, not duration or single step.

siddontang commented 7 years ago

@stepancheg

So we should add Timeout for request, but not only for connect here?

stepancheg commented 7 years ago

@siddontang implementing request timeout is a different, harder issue, and connection timeout is useful itself, so I think I'll merge this patch as soon as you implement minor changes I requested.

stepancheg commented 7 years ago

Thanks!