mirror of
https://github.com/fhmq/hmq.git
synced 2026-05-04 07:08:32 +00:00
Compare commits
1 Commits
v1.5.3
...
revert-102
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d69f13e48 |
@@ -256,24 +256,16 @@ func (this *snode) smatch(topic []byte, qos byte, subs *[]interface{}, qoss *[]b
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the key is "#", then these subscribers are added to the result set
|
|
||||||
n, ok := this.snodes[MWC]
|
|
||||||
if ok {
|
|
||||||
n.matchQos(qos, subs, qoss)
|
|
||||||
}
|
|
||||||
|
|
||||||
n, ok = this.snodes[SWC]
|
|
||||||
if ok {
|
|
||||||
if err := n.smatch(rem, qos, subs, qoss); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
level := string(ntl)
|
level := string(ntl)
|
||||||
n, ok = this.snodes[level]
|
|
||||||
if ok {
|
for k, n := range this.snodes {
|
||||||
if err := n.smatch(rem, qos, subs, qoss); err != nil {
|
// If the key is "#", then these subscribers are added to the result set
|
||||||
return err
|
if k == MWC {
|
||||||
|
n.matchQos(qos, subs, qoss)
|
||||||
|
} else if k == SWC || k == level {
|
||||||
|
if err := n.smatch(rem, qos, subs, qoss); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user