liuxiaolong
2021-01-07 c5d9cc29df9767a148c9cd79d6820c761bed88eb
requestCenter add log
2个文件已修改
10 ■■■■■ 已修改文件
hbusc.go 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
micronode.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hbusc.go
@@ -473,9 +473,11 @@
    n := h.sockWorker.sock.SendandrecvTimeout(rNodes, data,&ret, h.conf.sendTimeOut)
    h.printLog("requestCenter n:", n, "len(ret):", len(ret))
    if n > 0 && len(ret) > 0{
        var cr *CommonReply
        if err = json.Unmarshal(ret[0].Data, cr); err == nil {
            return cr, nil
        var cr CommonReply
        if err = json.Unmarshal(ret[0].Data, &cr); err == nil {
            return &cr, nil
        } else {
            h.printLog("unmarshal to CommonReply err:", err)
        }
    }
    return nil, fmt.Errorf("request center err")
micronode.go
@@ -195,7 +195,7 @@
        Topic: TOPIC_QUERYPROC,
    }
    cr, err := ms.handle.RequestCenter(&r)
    ms.printLog("requestCenter reply:", *cr, "err:", err)
    ms.printLog("requestCenter reply:", cr, "err:", err)
    if err != nil {
        return nil, err
    }