修改重复的订阅报错的bug
This commit is contained in:
parent
abb93c020f
commit
a4ea724bab
|
@ -6,7 +6,6 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"git.hpds.cc/Component/network/frame"
|
"git.hpds.cc/Component/network/frame"
|
||||||
herr "git.hpds.cc/Component/network/hpds_err"
|
|
||||||
"git.hpds.cc/Component/network/metadata"
|
"git.hpds.cc/Component/network/metadata"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -64,16 +63,16 @@ func (r *defaultRoute) Add(connId string, name string, observeDataTags []frame.T
|
||||||
return fmt.Errorf("SFN[%s] does not exist in config functions", name)
|
return fmt.Errorf("SFN[%s] does not exist in config functions", name)
|
||||||
}
|
}
|
||||||
|
|
||||||
LOOP:
|
//LOOP:
|
||||||
for _, conn := range r.data {
|
//for _, conn := range r.data {
|
||||||
for connId, n := range conn {
|
// for connId, n := range conn {
|
||||||
if n == name {
|
// if n == name {
|
||||||
err = herr.NewDuplicateNameError(connId, fmt.Errorf("SFN[%s] is already linked to another connection", name))
|
// err = herr.NewDuplicateNameError(connId, fmt.Errorf("SFN[%s] is already linked to another connection", name))
|
||||||
delete(conn, connId)
|
// delete(conn, connId)
|
||||||
break LOOP
|
// break LOOP
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
for _, tag := range observeDataTags {
|
for _, tag := range observeDataTags {
|
||||||
conn := r.data[tag]
|
conn := r.data[tag]
|
||||||
|
|
Loading…
Reference in New Issue