mirror of
https://github.com/fhmq/hmq.git
synced 2026-08-30 14:24:53 +00:00
fix a misleading annotation (#160)
This commit is contained in:
+1
-2
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user