VOL-2001 resolve sca errors
Change-Id: Iee4c814e721437c6f2f0d3387cac92be498ceb99
diff --git a/internal/pkg/afrouter/backend.go b/internal/pkg/afrouter/backend.go
index c597d49..aa18b81 100644
--- a/internal/pkg/afrouter/backend.go
+++ b/internal/pkg/afrouter/backend.go
@@ -26,6 +26,7 @@
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
"net/url"
"strconv"
"strings"
@@ -38,7 +39,6 @@
name string
beType backendType
activeAssociation association
- connFailCallback func(string, *backend) bool
connections map[string]*connection
openConns map[*connection]*grpc.ClientConn
activeRequests map[*request]struct{}
@@ -152,7 +152,7 @@
log.Debug("Starting request stream forwarding")
if s2cErr := request.forwardRequestStream(serverStream); s2cErr != nil {
// exit with an error to the stack
- return grpc.Errorf(codes.Internal, "failed proxying s2c: %v", s2cErr)
+ return status.Errorf(codes.Internal, "failed proxying s2c: %v", s2cErr)
}
// wait for response stream to complete
return <-request.responseErrChan
@@ -287,9 +287,3 @@
go cn.connect()
}
}
-
-// Set a callback for connection failure notification
-// This is currently not used.
-func (be *backend) setConnFailCallback(cb func(string, *backend) bool) {
- be.connFailCallback = cb
-}