fixed bug

This commit is contained in:
joy.zhou
2019-07-31 16:50:48 +08:00
parent 6506f5806f
commit 704040c3fd

View File

@@ -397,6 +397,11 @@ func (b *Broker) PublishMessage(packet *packets.PublishPacket) {
}
}
{
//deliver message to other node
go b.DeliverMessage(packet)
}
var subs []interface{}
var qoss []byte
err := b.topicsMgr.Subscribers([]byte(packet.TopicName), packet.Qos, &subs, &qoss)
@@ -429,7 +434,6 @@ func (b *Broker) PublishMessage(packet *packets.PublishPacket) {
publish(sub, packet)
}
b.DeliverMessage(packet)
}
func (b *Broker) OnlineOfflineNotification(clientID string, online bool) {