Merge pull request #1007 from dmcgowan/with-block-fast-fail

Add with block and fail on non-temp dial error
This commit is contained in:
Kenfe-Mickaël Laventure
2017-06-21 09:04:40 -07:00
committed by GitHub
2 changed files with 15 additions and 11 deletions

View File

@@ -68,9 +68,11 @@ func New(address string, opts ...ClientOpt) (*Client, error) {
}
gopts := []grpc.DialOption{
grpc.WithBlock(),
grpc.WithInsecure(),
grpc.WithTimeout(100 * time.Second),
grpc.WithDialer(dialer),
grpc.FailOnNonTempDialError(true),
}
if copts.defaultns != "" {
unary, stream := newNSInterceptors(copts.defaultns)