Reduce publish connection timeout

Fixes #2662

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2018-09-19 11:21:40 -04:00
parent 1ac5ac652b
commit 1ad49689d3

View File

@ -99,7 +99,7 @@ func connect(address string, d func(string, time.Duration) (net.Conn, error)) (*
grpc.FailOnNonTempDialError(true), grpc.FailOnNonTempDialError(true),
grpc.WithBackoffMaxDelay(3 * time.Second), grpc.WithBackoffMaxDelay(3 * time.Second),
} }
ctx, cancel := gocontext.WithTimeout(gocontext.Background(), 60*time.Second) ctx, cancel := gocontext.WithTimeout(gocontext.Background(), 2*time.Second)
defer cancel() defer cancel()
conn, err := grpc.DialContext(ctx, dialer.DialAddress(address), gopts...) conn, err := grpc.DialContext(ctx, dialer.DialAddress(address), gopts...)
if err != nil { if err != nil {