Browse Source

update 保护字符截取边界

pull/2/head
lucas 2 months ago
parent
commit
cdcc7ddc28
  1. 2
      consumers/consumerWJHP.go

2
consumers/consumerWJHP.go

@ -78,7 +78,7 @@ func (the *consumerWJHP) Work() {
}
func (the *consumerWJHP) onData(Topic string, Msg string) {
if len(Msg) > 80 {
log.Printf("mqtt-recv:[%s]:%s ...", Topic, Msg[:100])
log.Printf("mqtt-recv:[%s]:%s ...", Topic, Msg[:80])
}
var needPush []byte
topicPrefixIndex := strings.LastIndex(Topic, "/")

Loading…
Cancel
Save