Merge pull request #818 from petermattis/pmattis/retry-client-handshake-eof
Retry transport creation when ClientHandshake returns EOF
This commit is contained in:
@ -135,8 +135,9 @@ func newHTTP2Client(ctx context.Context, addr string, opts ConnectOptions) (_ Cl
|
|||||||
conn, authInfo, connErr = creds.ClientHandshake(ctx, addr, conn)
|
conn, authInfo, connErr = creds.ClientHandshake(ctx, addr, conn)
|
||||||
}
|
}
|
||||||
if connErr != nil {
|
if connErr != nil {
|
||||||
// Credentials handshake error is not a temporary error.
|
// Credentials handshake error is not a temporary error (unless the error
|
||||||
return nil, ConnectionErrorf(false, connErr, "transport: %v", connErr)
|
// was the connection closing).
|
||||||
|
return nil, ConnectionErrorf(connErr == io.EOF, connErr, "transport: %v", connErr)
|
||||||
}
|
}
|
||||||
ua := primaryUA
|
ua := primaryUA
|
||||||
if opts.UserAgent != "" {
|
if opts.UserAgent != "" {
|
||||||
|
Reference in New Issue
Block a user