1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

resolver/discovery: fix endpoint, scheme don't match grpc (#831)

This commit is contained in:
miya 2021-04-14 11:37:20 +08:00 committed by GitHub
parent 0921f0156e
commit c673439d96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,9 @@ func (r *discoveryResolver) update(ins []*registry.ServiceInstance) {
r.log.Errorf("Failed to parse discovery endpoint: %v", err)
continue
}
if endpoint == "" {
continue
}
addr := resolver.Address{
ServerName: in.Name,
Attributes: parseAttributes(in.Metadata),