fix a misleading annotation (#160)

This commit is contained in:
ZhangJian He
2022-04-25 20:38:03 +08:00
committed by GitHub
parent a95c028cb8
commit 7787d3ca0d
2 changed files with 3 additions and 8 deletions
+1 -2
View File
@@ -413,7 +413,7 @@ func (c *client) processClientPublish(packet *packets.PublishPacket) {
return
}
//publish kafka
//publish to bridge mq
c.broker.Publish(&bridge.Elements{
ClientID: c.info.clientID,
Username: c.info.username,
@@ -474,7 +474,6 @@ func (c *client) ProcessPublishMessage(packet *packets.PublishPacket) {
return
}
// fmt.Println("psubs num: ", len(c.subs))
if len(c.subs) == 0 {
return
}
+2 -6
View File
@@ -129,10 +129,9 @@ func (c *csvLog) writeToLog(els []Elements) error {
// for performance we batch messages into an outqueue and write them in bulk when a timer expires
func (c *csvLog) Worker() {
log.Info("Running CSVLog worker")
run := true
var outqueue []Elements
for run == true {
for true {
c.RLock()
waitInterval := c.config.WriteIntervalSecs
c.RUnlock()
@@ -191,10 +190,7 @@ func (c *csvLog) Worker() {
}
break
}
if run != true {
log.Info("Closing CSV Bridge worker")
break
}
}
}