update plugin
This commit is contained in:
1 parent
148738800b
commit
69a26f8cd9
176 files changed
+18008
-2772
No files matched your search
+12
-7
@@ -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))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user