mirror of
https://github.com/fhmq/hmq.git
synced 2026-04-26 19:48:34 +00:00
close
This commit is contained in:
@@ -392,3 +392,17 @@ func (b *Broker) ProcessPublishMessage(packet *packets.PublishPacket) {
|
||||
// s.qmu.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
func (b *Broker) BroadcastUnSubscribe(subs map[string]*subscription) {
|
||||
|
||||
ubsub := packets.NewControlPacket(packets.Unsubscribe).(*packets.UnsubscribePacket)
|
||||
for topic, _ := range subs {
|
||||
// topic := sub.topic
|
||||
// if sub.queue {
|
||||
// topic = "$queue/" + sub.topic
|
||||
// }
|
||||
ubsub.Topics = append(ubsub.Topics, topic)
|
||||
}
|
||||
b.BroadcastSubOrUnsubMessage(ubsub)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user