mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Log the actual error when gRPC connect/handshake fails (#891)
This commit is contained in:
@@ -29,7 +29,7 @@ func dial(ctx context.Context, address string, creds credentials.TransportCreden
|
||||
defer cancel()
|
||||
conn, err := (&net.Dialer{Cancel: ctx.Done(), Timeout: timeoutDialer}).Dial("tcp", address)
|
||||
if err != nil {
|
||||
logrus.WithField("grpc_addr", address).Warn("Failed to dial grpc connection")
|
||||
logrus.WithError(err).WithField("grpc_addr", address).Warn("Failed to dial grpc connection")
|
||||
return nil, err
|
||||
}
|
||||
if creds == nil {
|
||||
@@ -39,7 +39,7 @@ func dial(ctx context.Context, address string, creds credentials.TransportCreden
|
||||
|
||||
conn, _, err = creds.ClientHandshake(ctx, address, conn)
|
||||
if err != nil {
|
||||
logrus.WithField("grpc_addr", address).Warn("Failed grpc handshake")
|
||||
logrus.WithError(err).WithField("grpc_addr", address).Warn("Failed grpc handshake")
|
||||
return nil, err
|
||||
}
|
||||
return conn, nil
|
||||
|
||||
Reference in New Issue
Block a user