mirror of
https://github.com/fhmq/hmq.git
synced 2026-05-04 07:08:32 +00:00
[cleanup] delete comment out code (#137)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user