liuxiaolong
2021-09-27 545fb87bae9b38f04495c6ac311f6ba651720b44
ReadSub set timeout 100
1个文件已修改
4 ■■■■ 已修改文件
hbusc.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hbusc.go
@@ -167,11 +167,11 @@
    for {
        select {
        case <-ctx.Done():
            logFn("recvRoutine ctx.Done")
            logFn("recvSubRoutine ctx.Done")
            wg.Done()
            return
        default:
            if bhsgo.ReadSub(&procId, &msg, -1) {
            if bhsgo.ReadSub(&procId, &msg, 100) {
                ch <- msg
                logFn("ReadSub topic:", string(msg.Topic), " data:", string(msg.Data))