mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
fix: operation id invalid
This commit is contained in:
parent
f36c941adf
commit
3015d54c17
@ -95,7 +95,7 @@ func (cm *ConnManager) GetConn(ctx context.Context, serviceName string, opts ...
|
|||||||
return nil, errs.Wrap(errors.New("unknown service name"), "serviceName", serviceName)
|
return nil, errs.Wrap(errors.New("unknown service name"), "serviceName", serviceName)
|
||||||
}
|
}
|
||||||
|
|
||||||
conn, err := dialService(address, append(cm.additionalOpts, opts...)...)
|
conn, err := dialService(ctx, address, append(cm.additionalOpts, opts...)...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -117,9 +117,9 @@ func (cm *ConnManager) CloseConn(conn *grpc.ClientConn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func dialService(address string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
|
func dialService(ctx context.Context, address string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
|
||||||
options := append(opts, grpc.WithInsecure()) // Replace WithInsecure with proper security options
|
options := append(opts, grpc.WithInsecure()) // Replace WithInsecure with proper security options
|
||||||
conn, err := grpc.DialContext(context.Background(), address, options...)
|
conn, err := grpc.DialContext(ctx, address, options...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user