Handling exception: getcdv3.GetConn == nil

pull/236/head
skiffer-git 3 years ago
parent d058cacb38
commit 24f2ffe82d

@ -205,7 +205,15 @@ func (s *officeServer) SendMsg2Tag(_ context.Context, req *pbOffice.SendMsg2TagR
} }
var groupUserIDList []string var groupUserIDList []string
for _, groupID := range req.GroupList { for _, groupID := range req.GroupList {
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName, req.OperationID)
if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetConn == nil"
log.NewError(req.OperationID, errMsg)
resp.CommonResp.ErrCode = constant.ErrInternal.ErrCode
resp.CommonResp.ErrMsg = errMsg
return resp, nil
}
cacheClient := pbCache.NewCacheClient(etcdConn) cacheClient := pbCache.NewCacheClient(etcdConn)
req := pbCache.GetGroupMemberIDListFromCacheReq{ req := pbCache.GetGroupMemberIDListFromCacheReq{
OperationID: req.OperationID, OperationID: req.OperationID,

Loading…
Cancel
Save