Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

This commit is contained in:
wangchuxiao
2023-03-13 15:39:54 +08:00
4 changed files with 9 additions and 2 deletions
+4
View File
@@ -39,6 +39,10 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
func (s *authServer) UserToken(ctx context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) {
log.Info("", "rpc come UserToken")
operationID, ok := ctx.Value(constant.OperationID).(string)
if !ok {
log.Error("2222", "ctx missing operationID", operationID)
}
resp := pbAuth.UserTokenResp{}
if _, err := s.userCheck.GetUserInfo(ctx, req.UserID); err != nil {
log.Info("", "UserToken err:", err.Error())
+1 -1
View File
@@ -31,7 +31,7 @@ func Start(rpcPort int, rpcRegisterName string, prometheusPort int, rpcFn func(c
return utils.Wrap1(err)
}
defer zkClient.Close()
zkClient.AddOption(grpc.WithTransportCredentials(insecure.NewCredentials()))
zkClient.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()))
registerIP, err := network.GetRpcRegisterIP(config.Config.RpcRegisterIP)
if err != nil {
return err