Commit 3b565572 authored by suyanlong's avatar suyanlong

Fixed route bug

parent e7971c4e
Pipeline #8341 canceled with stages
......@@ -189,7 +189,6 @@ func (r *router) Route(msg *pb.Message) error {
return err
}
case pb.Message_IBTP_GET:
case pb.Message_IBTP_RECEIPT_GET:
default:
return nil
......@@ -198,19 +197,20 @@ func (r *router) Route(msg *pb.Message) error {
default:
return nil
}
}
// 规则判断 转发给其它的sidecar节点
method := strings.ToLower(ibtpx.RouteMethod)
if md, is := r.methodMap[method]; is {
ports := md(ibtpx.RouteMethodArg)
if len(ports) == 0 {
} else {
// 规则判断 转发给其它的sidecar节点
method := strings.ToLower(ibtpx.RouteMethod)
if md, is := r.methodMap[method]; is {
ports := md(ibtpx.RouteMethodArg)
if len(ports) == 0 {
r.firstRoute(msg)
}
for _, p := range ports {
_ = p.AsyncSend(msg)
}
} else {
r.firstRoute(msg)
}
for _, p := range ports {
_ = p.AsyncSend(msg)
}
} else {
r.firstRoute(msg)
}
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment