fix bug: init conn once

This commit is contained in:
wangchuxiao 2023-07-13 20:05:39 +08:00
parent 38a191e5d1
commit 99de4f8a7e

View File

@ -131,10 +131,6 @@ func NewMessage(discov discoveryregistry.SvcDiscoveryRegistry) *Message {
panic(err)
}
client := msg.NewMsgClient(conn)
conn, err = discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImUserName)
if err != nil {
panic(err)
}
return &Message{discov: discov, conn: conn, Client: client}
}