update plugin

This commit is contained in:
joy.zhou
2019-08-19 10:33:19 +08:00
parent 148738800b
commit 69a26f8cd9
176 changed files with 18008 additions and 2772 deletions

View File

@@ -139,13 +139,18 @@ func unWrapPublishPacket(packet *packets.PublishPacket) *packets.PublishPacket {
}
func publish(sub *subscription, packet *packets.PublishPacket) {
var p *packets.PublishPacket
if sub.client.info.username != "root" {
p = unWrapPublishPacket(packet)
} else {
p = wrapPublishPacket(packet)
}
err := sub.client.WriterPacket(p)
// var p *packets.PublishPacket
// if sub.client.info.username != "root" {
// p = unWrapPublishPacket(packet)
// } else {
// p = wrapPublishPacket(packet)
// }
// err := sub.client.WriterPacket(p)
// if err != nil {
// log.Error("process message for psub error, ", zap.Error(err))
// }
err := sub.client.WriterPacket(packet)
if err != nil {
log.Error("process message for psub error, ", zap.Error(err))
}