mirror of
https://github.com/mochi-mqtt/server.git
synced 2025-12-24 12:58:05 +08:00
Fix the bug where inline subscribers do not receive messages after all non-inline clients unsubscribe. (#386)
Co-authored-by: JB <28275108+mochi-co@users.noreply.github.com>
This commit is contained in:
@@ -514,7 +514,7 @@ func (x *TopicsIndex) seek(filter string, d int) *particle {
|
||||
|
||||
// trim removes empty filter particles from the index.
|
||||
func (x *TopicsIndex) trim(n *particle) {
|
||||
for n.parent != nil && n.retainPath == "" && n.particles.len()+n.subscriptions.Len()+n.shared.Len() == 0 {
|
||||
for n.parent != nil && n.retainPath == "" && n.particles.len()+n.subscriptions.Len()+n.shared.Len()+n.inlineSubscriptions.Len() == 0 {
|
||||
key := n.key
|
||||
n = n.parent
|
||||
n.particles.delete(key)
|
||||
|
||||
Reference in New Issue
Block a user