[cleanup] delete comment out code (#137)

This commit is contained in:
ZhangJian He
2022-01-10 10:59:39 +08:00
committed by GitHub
parent 46b64e5b84
commit 108e934a85
3 changed files with 0 additions and 16 deletions

View File

@@ -514,7 +514,6 @@ func (b *Broker) connectRouter(id, addr string) {
c.SendConnect()
// mpool := b.messagePool[fnv1a.HashString64(cid)%MessagePoolNum]
go c.readLoop()
go c.StartPing()
@@ -597,7 +596,6 @@ func (b *Broker) BroadcastInfoMessage(remoteID string, msg *packets.PublishPacke
return true
})
// log.Info("BroadcastInfoMessage success ")
}
func (b *Broker) BroadcastSubOrUnsubMessage(packet packets.ControlPacket) {
@@ -609,7 +607,6 @@ func (b *Broker) BroadcastSubOrUnsubMessage(packet packets.ControlPacket) {
}
return true
})
// log.Info("BroadcastSubscribeMessage remotes: ", s.remotes)
}
func (b *Broker) removeClient(c *client) {
@@ -623,7 +620,6 @@ func (b *Broker) removeClient(c *client) {
case REMOTE:
b.remotes.Delete(clientId)
}
// log.Info("delete client ,", clientId)
}
func (b *Broker) PublishMessage(packet *packets.PublishPacket) {

View File

@@ -141,17 +141,6 @@ 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)
// if err != nil {
// log.Error("process message for psub error, ", zap.Error(err))
// }
switch packet.Qos {
case QosAtMostOnce:
err := sub.client.WriterPacket(packet)

View File

@@ -66,7 +66,6 @@ func NewInfo(sid, url string, isforword bool) *packets.PublishPacket {
pub.TopicName = BrokerInfoTopic
pub.Retain = false
info := fmt.Sprintf(`{"brokerID":"%s","brokerUrl":"%s"}`, sid, url)
// log.Info("new info", string(info))
pub.Payload = []byte(info)
return pub
}