Fix to properly return the backend cluster on a query.
Change-Id: I18695652987db2ce8bd0004a19b7efeac53cb9b9
diff --git a/afrouter/afrouter/round-robin-router.go b/afrouter/afrouter/round-robin-router.go
index 4e81985..8201541 100644
--- a/afrouter/afrouter/round-robin-router.go
+++ b/afrouter/afrouter/round-robin-router.go
@@ -122,8 +122,11 @@
return rr.grpcService
}
-func (rr RoundRobinRouter) FindBackendCluster(string) (*backendCluster) {
- return rr.bkndClstr
+func (rr RoundRobinRouter) FindBackendCluster(becName string) (*backendCluster) {
+ if becName == rr.bkndClstr.name {
+ return rr.bkndClstr
+ }
+ return nil
}
func (rr RoundRobinRouter) ReplyHandler(sel interface{}) error { // This is a no-op