zhangmeng
2020-07-30 e6b7905ee621994fad2b829d27239486147eebac
gaizhengshanchudiaoxianjinchengkeydebug
2个文件已修改
11 ■■■■ 已修改文件
library.go 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
softbus.go 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
library.go
@@ -156,7 +156,11 @@
    // sub使用一个socket
    sockSub := OpenDgramSocket()
    sockSub.Bind(int(regReply.SubTopicKey))
    // sockSub.Bind(int(regReply.SubTopicKey))
    // 订阅主题
    for _, v := range info.SubTopic {
        sockSub.Sub(v, int(regReply.SubTopicKey))
    }
    // 启动接收线程
    go recvRoutine(ctx, sockSub, chSub)
    sub := &subOReply{
@@ -198,6 +202,8 @@
// GetTopicInfo get topic info
func (h *Handle) GetTopicInfo(topic, typ string) int {
    // 据说不更新,先用缓存,否则需要新创建一个socket,来从manager请求key
    // ***k
    if v, ok := h.m[topic]; ok {
        return v.sock.Port()
    }
softbus.go
@@ -76,7 +76,8 @@
        return errors.New("C SoftBus Handle Is Nil")
    }
    if len(keys) == 0 {
        return errors.New("Live Queue Keys Is Nil")
        C.wrap_fn_shm_rm_dead_queue(libsoftbus, nil, 0)
        return nil
    }
    l := len(keys)