淇敼锛?銆佸皢鏃ュ織鑷畾涔夊啓鍏ユ棩蹇楁枃浠?zhub.log 2銆佸叾浠栦紭鍖?

git-svn-id: svn://47.119.165.148/zhub@164 e63fbceb-bcc3-4977-ac22-735b83d8d0f4
This commit is contained in:
lxy
2023-04-23 12:09:03 +00:00
parent c4709e2529
commit 4911d059a2
7 changed files with 85 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
package zsub
import (
"log"
"sync"
"sync/atomic"
)
@@ -37,9 +38,12 @@ func (g *ZGroup) appendTo(c *ZConn) {
err := c.send("message", topic, msg)
if err != nil { // 失败处理
log.Println("topic send err:", err)
g.chMsg <- msg
return
}
//log.Printf("[ %d ] topic send: %s %s\n", c.sn, topic, msg)
atomic.AddInt32(&g.offset, 1)
case <-c.stoped:
return