Skip to content

Commit 490a1a6

Browse files
committed
Fix the bug where inline subscribers do not receive messages after all non-inline clients unsubscribe.
1 parent 6b3b30e commit 490a1a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

topics.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ func (x *TopicsIndex) seek(filter string, d int) *particle {
514514

515515
// trim removes empty filter particles from the index.
516516
func (x *TopicsIndex) trim(n *particle) {
517-
for n.parent != nil && n.retainPath == "" && n.particles.len()+n.subscriptions.Len()+n.shared.Len() == 0 {
517+
for n.parent != nil && n.retainPath == "" && n.particles.len()+n.subscriptions.Len()+n.shared.Len()+n.inlineSubscriptions.Len() == 0 {
518518
key := n.key
519519
n = n.parent
520520
n.particles.delete(key)

0 commit comments

Comments
 (0)