Commit 041e1292 authored by suyanlong's avatar suyanlong

bug: adjust get port

parent fd0f3d7c
......@@ -85,13 +85,14 @@ func (p *PortMap) Port(id string) (Port, bool) {
if p.local != nil && p.local.ID() == id {
return p.local, true
}
if pt, is := p.peerPort[id]; is {
if pt, is := p.appchainPort[id]; is {
return pt, is
}
if pt, is := p.appchainPort[id]; is {
if pt, is := p.peerPort[id]; is {
return pt, is
}
return nil, false
}
......
......@@ -56,7 +56,7 @@ func (r *router) Stop() error {
return nil
}
// TODO
// Add TODO
func (r *router) Add(p port.Port) {
r.portMap.Add(p)
go func() {
......
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