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 return
} }
//publish kafka //publish to bridge mq
c.broker.Publish(&bridge.Elements{ c.broker.Publish(&bridge.Elements{
ClientID: c.info.clientID, ClientID: c.info.clientID,
Username: c.info.username, Username: c.info.username,
@@ -474,7 +474,6 @@ func (c *client) ProcessPublishMessage(packet *packets.PublishPacket) {
return return
} }
// fmt.Println("psubs num: ", len(c.subs))
if len(c.subs) == 0 { if len(c.subs) == 0 {
return 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 // for performance we batch messages into an outqueue and write them in bulk when a timer expires
func (c *csvLog) Worker() { func (c *csvLog) Worker() {
log.Info("Running CSVLog worker") log.Info("Running CSVLog worker")
run := true
var outqueue []Elements var outqueue []Elements
for run == true { for true {
c.RLock() c.RLock()
waitInterval := c.config.WriteIntervalSecs waitInterval := c.config.WriteIntervalSecs
c.RUnlock() c.RUnlock()
@@ -191,10 +190,7 @@ func (c *csvLog) Worker() {
} }
break break
} }
if run != true {
log.Info("Closing CSV Bridge worker")
break
}
} }
} }