Check correct err in connection
@@ -63,7 +63,7 @@ func NewConnection(ctx fabcontext.Client, chConfig fab.ChannelCfg, streamProvide
stream, err := streamProvider(grpcconn)
if err != nil {
- if closeErr := grpcconn.Close(); err != nil {
+ if closeErr := grpcconn.Close(); closeErr != nil {
logger.Warnf("error closing GRPC connection: %s", closeErr)
}
return nil, errors.Wrapf(err, "could not create stream to %s", url)
