fix: direct conn cannot find name

pull/1775/head
AndrewZuo01 2 years ago
parent 062cc3a97f
commit b4d994113e

@ -16,6 +16,7 @@ package rpcclient
import ( import (
"context" "context"
"fmt"
"strings" "strings"
"github.com/openimsdk/open-im-server/v3/pkg/authverify" "github.com/openimsdk/open-im-server/v3/pkg/authverify"
@ -40,6 +41,7 @@ type User struct {
// NewUser initializes and returns a User instance based on the provided service discovery registry. // NewUser initializes and returns a User instance based on the provided service discovery registry.
func NewUser(discov discoveryregistry.SvcDiscoveryRegistry) *User { func NewUser(discov discoveryregistry.SvcDiscoveryRegistry) *User {
fmt.Println("user name ", config.Config.RpcRegisterName.OpenImUserName)
conn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImUserName) conn, err := discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImUserName)
if err != nil { if err != nil {
panic(err) panic(err)

Loading…
Cancel
Save