This commit is contained in:
joy.zhou
2019-07-16 17:49:04 +08:00
parent 9ca49de6c8
commit c5ba2aace9

View File

@@ -341,7 +341,7 @@ func (c *client) processClientSubscribe(packet *packets.SubscribePacket) {
for i, topic := range topics {
t := topic
//check topic auth for client
if c.broker.CheckTopicAuth(SUB, c.info.username, topic) {
if !b.CheckTopicAuth(SUB, c.info.username, topic) {
log.Error("Sub topic Auth failed: ", zap.String("topic", topic), zap.String("ClientID", c.info.clientID))
retcodes = append(retcodes, QosFailure)
continue