Update unix dialer to keep retrying if socket is gone

This is needed to support daemon restart as the unix socket is recreated at
every start.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-08-10 15:39:09 -07:00
parent f27f8dd120
commit 24aac336f3
2 changed files with 58 additions and 2 deletions

View File

@@ -64,8 +64,9 @@ func New(address string, opts ...ClientOpt) (*Client, error) {
gopts := []grpc.DialOption{
grpc.WithBlock(),
grpc.WithInsecure(),
grpc.WithTimeout(100 * time.Second),
grpc.WithTimeout(60 * time.Second),
grpc.FailOnNonTempDialError(true),
grpc.WithBackoffMaxDelay(3 * time.Second),
grpc.WithDialer(dialer),
}
if len(copts.dialOptions) > 0 {