diff --git a/router.go b/router.go index 585ba07..c8b5b44 100644 --- a/router.go +++ b/router.go @@ -3,7 +3,6 @@ package hpds_node import ( "fmt" "git.hpds.cc/Component/network" - "git.hpds.cc/Component/network/hpds_err" "git.hpds.cc/pavement/hpds_node/config" "sync" ) @@ -51,17 +50,17 @@ func (r *route) Add(connId string, name string, observeDataTags []byte) (err err if !ok { return fmt.Errorf("SFN[%s] does not exist in config functions", name) } - -LOOP: - for _, connects := range r.data { - for connKey, n := range connects { - if n == name { - err = hpds_err.NewDuplicateNameError(connKey, fmt.Errorf("node:Stream Function[%s] is already linked to another connection", name)) - delete(connects, connKey) - break LOOP - } - } - } + //去除只能订阅一次的问题 + //LOOP: + //for _, connects := range r.data { + // for connKey, n := range connects { + // if n == name { + // err = hpds_err.NewDuplicateNameError(connKey, fmt.Errorf("node:Stream Function[%s] is already linked to another connection", name)) + // delete(connects, connKey) + // break LOOP + // } + // } + //} for _, tag := range observeDataTags { connects := r.data[tag]