Skip to content

Commit

Permalink
second fix for #738
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Apr 23, 2022
1 parent e935093 commit 16be737
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3080,6 +3080,11 @@ func (t *Topic) replyDelSub(sess *Session, asUid types.Uid, msg *ClientComMessag

t.evictUser(uid, true, "")

// If all P2P users were deleted, suspend the topic to let it shut down.
if t.cat == types.TopicCatP2P && t.subsCount() == 0 {
t.markDeleted()
}

// Notify plugins.
pluginSubscription(&types.Subscription{Topic: t.name, User: uid.UserId()}, plgActDel)

Expand Down

0 comments on commit 16be737

Please sign in to comment.